Try Cursed out today in the online interpreter! (Disclaimer: Doesn't work yet; it'll work tomorrow.)
Example program to demonstrate syntax: Cursed FizzBuzz
Note: Potential features / features with missing details are marked with (?)
-
There will be a golfy syntax and readable syntax for most things, which can be mixed together
-
Switchstatements instead ofifstatements, but instead ofbreak, you have to usegoto -
Whileloops that confirm that you actually want to break the loop -
Fourloops that always execute four times -
Labels are set with
;label; -
There are
goto ;label;statements, which you can return from by usinggoto ;camefrom; -
Dysfunctional Functions™ (Not sure what that means yet, but with a name like that, I've got to include it.)
-
All variables are global
-
\uxxxxanywhere gets converted to UTF-16 character before execution; if part of it is missing, it gets padded with random characters0-F -
No rng commands, instead you use the previous feature or a delimiter that marks code as optional so it gets executed 50% of the time
-
Output is just a variable, and you produce output by setting that variable. However, to reduce ambiguity, any variable with
outin the name will work -
Input is also a variable, which you retrieve a value from. Again, any variable with
inin the name will work -
Use
->to set variables or retrieve from variables. You can also use<- -
Strings are delimited with double single quotes:
''Hello World'' -
Arrays are delimited with single double quotes, with pipes separating values:
"1|2|3" -
Arrays can have negative and decimal indexes, and they're 1-indexed, i.e.
a"-2", a"-1", a"1", a"2"will all work, buta"0"will just segfault -
All keywords can be used as variables, rendering the function of the keyword inoperable
-
Like any keyword, you can try to set
nulllike a variable, but the value will be trashed -
Like keywords, you can also use numbers as variables, including decimals
-
Escape character is
!, but to escape!characters, you have to use\ -
Brackets are mirrored, e.g.
}]) ([{ -
Strange automatic typecasting / overloading, e.g.
[] -> 0[[]] -> 1null -> 0[null] -> 1- etc.
Print "Hello, World!"
''Hello, World\!''->out
Truth-Machine
x<-in})x(x->out{
Cat Program
in->out
Define an Array of Strings
"''Hello''|''World\!''"