strath/sm-test-files/hello.sm

60 lines
1,003 B
Text
Raw Normal View History

2021-12-16 08:40:17 +00:00
#mult /}}string{{str\ /{float}num\ |
¿string * float?
&& rest line comment
]]Inline comment[[
``
multiline comment
indention example (comments have to be indented as well, btw):
first level
second level
third level
fourth level
fifth level
sixth level
main function has to be a thing
´´
¡}}string{{ variable!
&& take input into variable
¡=>/variable\!
&& output variable
¡<=/variable\!
&& $ means true
&& € means false
2021-12-16 09:03:50 +00:00
&& == is implied in if conditions
&& = is equal to ===
2021-12-16 08:40:17 +00:00
&& if condition is true log the text
¿??$/condition\ |
¡<=/"condition was true"!
?
&& if condition is false log the text
¿??€/condition\ |
¡<=/"condition was false"!
?
¿??$/condition\ |
¡<=
#sub /\ | (
&& This code prints hello world
2021-12-16 09:03:50 +00:00
¿??$? |
!<= "Hello World"!;
)
#sub /\ | (
&& This code checks if input is equal to another string
¿??$ /=> "hello"\? | && Takes input and compares to string
!<= "World!"!; Prints World!
)