strath/sm-test-files/hello.sm

60 lines
997 B
Text
Raw Normal View History

2021-12-16 09:38:27 +00:00
#mult /}}string{{str\ /{float}num\ | (
2021-12-16 08:40:17 +00:00
¿string * float?
2021-12-16 09:38:27 +00:00
)
2021-12-16 08:40:17 +00:00
&& 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
2021-12-16 09:38:27 +00:00
¿??$/condition\ | (
2021-12-16 08:40:17 +00:00
¡<=/"condition was true"!
2021-12-16 09:38:27 +00:00
)?
2021-12-16 08:40:17 +00:00
&& if condition is false log the text
2021-12-16 09:38:27 +00:00
¿??€/condition\ | (
2021-12-16 08:40:17 +00:00
¡<=/"condition was false"!
2021-12-16 09:38:27 +00:00
)?
2021-12-16 08:40:17 +00:00
2021-12-16 09:38:27 +00:00
#sub /\ | (
&& This code prints hello world
2021-12-16 09:38:27 +00:00
¿??$? | (
2021-12-16 09:03:50 +00:00
!<= "Hello World"!;
2021-12-16 09:38:27 +00:00
)
2021-12-16 09:03:50 +00:00
)
#sub /\ | (
&& This code checks if input is equal to another string
2021-12-16 09:38:27 +00:00
¿??$ /=> "hello"\? | ( && Takes input and compares to string
2021-12-16 09:03:50 +00:00
!<= "World!"!; Prints World!
2021-12-16 09:38:27 +00:00
)?
)