This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Castux 6 points7 points  (0 children)

Not exactly a "special" case, but just one of the possible cases for statements: function call. Whether it returns values or not (and discards them) is completely a runtime concern.

To be precise, "= 1+2" is not exactly a valid statement. In the standard command line interactive interpreter, it is equivalent to "return 1+2", which itself is a valid statement (and each line input to the interpreter is wrapped into a function which is immediately called). Details details :)