Skip to content
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

EOL doesn't replace MKAY when calling a variadic function #59

Open
sjoqvist opened this issue Aug 21, 2019 · 0 comments
Open

EOL doesn't replace MKAY when calling a variadic function #59

sjoqvist opened this issue Aug 21, 2019 · 0 comments

Comments

@sjoqvist
Copy link

sjoqvist commented Aug 21, 2019

The following program prints 1, as expected.

HAI 1.2
  VISIBLE SUM OF 0 AN ANY OF FAIL AN WIN MKAY
KTHXBYE

However, according to the specs:

An MKAY may be omitted if it coincides with the end of the line/statement, in which case the EOL stands in for as many MKAYs as there are open variadic functions.

The way I read this, the program above should be possible to rewrite into the following.

HAI 1.2
  VISIBLE SUM OF 0 AN ANY OF FAIL AN WIN
KTHXBYE

But this quits with the error message test.lol:2: expected expression at: end of line.

Is this a bug in the specification, in the interpreter, or in my understanding of the specs?


EDIT: The description above concerns mathematical operations, but the same goes for SMOOSH, which is mentioned on its own in the specs.

The line ending may safely implicitly close the SMOOSH operator without needing an MKAY.

The following works for me.

HAI 1.2
SMOOSH "x" AN "y" MKAY
KTHXBYE

But this doesn't (expected expression at: end of line)

HAI 1.2
SMOOSH "x" AN "y"
KTHXBYE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant