-
-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: disallow ++ #1365
Comments
Good point. This is very confusing. And it'll probably I see four options
Does anyone else have an opinion? And if we go with the first option,
|
Would it be possible to only allow x++ and ++x for ints only? If so, I would vote including ++ for ints and option 3, trap and raise an If not, then option 1. I'd also want a += type operator, but not sure what On Friday, March 13, 2015, Bob Carpenter notifications@github.com wrote:
|
Stanc3 errors with: Syntax error in 'examples/bugs/test_model.stan', line 3, column 4 to column 5, parsing error:
Ill-formed expression. Expect an expression after "+". So closing. |
I had some Stan code that had the lines
thinking that I was using the pre-increment operator on idx. Instead, it appears that "++idx" was interpreted as +(+idx), i.e., just idx. This is correct according to the published syntax reference, but unexpected. I suggest that "++" should be parsed as one token and, as long as pre-increment isn't supported, should give an error.
The text was updated successfully, but these errors were encountered: