Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

That’s neat!

As of now, the modern : syntax for types clashes a bit with the : syntax for having multiple commands on a line if a command or assignment ends in a variable.

Print "hello" : Print "world" ; Output: "hello world"
                              ; works as "hello" is no variable
Local x$ = "hello"
Print x : Print "world"       ; Parser error: “Expecting end-of-file”.
Local x$ = "hello", y$ = "world"
Print x : Print y             ; Compiler error: “Type "print" not found“.

It can be solved by supplying types or parenthesis:

Local x$ = "hello", y$ = "world"
Print x$ : Print y           ; works!
Print(x) : Print y           ; works!

This problem would not be necessary in the syntax: The feature to declare typing information for variables appearing in arguments only makes sense in a context where the variable has not been properly introduced through a definition or assignment. But this situation is precisely the one prohibited by the new secure/modern dialects.