-
Notifications
You must be signed in to change notification settings - Fork 228
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
Parameters are passed in reverse order #9
Comments
Parameters must be popped in reverse order since the first parameter is deeper in the stack. It worked fine when multiple parameters were declared in the same statement, but for more than one statement it didn't know which one was the last. Edit: Also fixed the MOD function parameter order, although that was an unrelated problem. |
Thanks! All the work you guys put into this mod is much appreciated. Also, I never even knew I could do this:
Much easier! I guess I was the first to notice this bug because everyone else uses the better syntax... |
No I use your syntax too, because I want to put comments explaining the parameters in the code. |
@Dunbaratu How about something like this?
That way you can comment each parameter, while being more concise and DRY. |
The older parsers were very finicky and didn't like putting comments like that in the middle of multi-line syntax. |
The parameter list of a script is passed to it backwards. Example script test.txt:
Call it from the terminal as follows:
The expected result would be:
But, the actual result is:
I believe this bug also effects some or all built-in functions (but not constructors):
According to the documentation, this command should return 3. However, it actually returns 6. But, it gives the expected answer if we flip the parameters:
The text was updated successfully, but these errors were encountered: