Investigate parsing of attached mod-file
The file Q4_disc.mod seems to not be correctly parsed. The parameter lambda
is defined, but is not set by the preprocessor.
The file Q4_disc.mod seems to not be correctly parsed. The parameter lambda
is defined, but is not set by the preprocessor.
added bug label
assigned to @houtanb
@JohannesPfeifer the problem is that sde_rn
is not defined. When the preprocessor sees code that it doesn't recognize, it parses it as a Matlab statement until the end of the line. Since the user sets the value of lambda
on the same line after they set the value of sde_rn
, that value is passed as a Matlab statement and is not viewed as an init_param
statement. In fact, you can see this in +Q4_disk/driver.m
output by the preprocessor on line 176
.
closed
removed bug label
@houtanb Then we should document this. In the manual, we state
Each command and each element of a block is terminated by a semicolon (;).
But obviously, putting a semicolon is not sufficient. There are cases where the linebreak is actually relevant.
That statement is exactly correct. What is missing is a statement about how native Matlab code is treated (that it is parsed until the end of the line). Feel free to add it or to modify the doc to make it more clear.
mentioned in merge request !1646 (merged)
mentioned in commit eddf501b