added cat.sm

This commit is contained in:
Schrottkatze 2021-12-16 10:38:27 +01:00
parent 660294523e
commit e98f230db1
2 changed files with 43 additions and 11 deletions

View file

@ -0,0 +1,32 @@
&& import via &=>
¡&=> "animal.sm"!
&& inherit via :::
++cat:::animal (
¡+}}float{{ meowingVolume!;
### /}}string{{ name\ /}}float{{ speed\ /}}float{{ meowingVolume\ | (
&& ## calls the super
¡##/name, speed\!;
¡+meowingVolume < meowingVolume!;
)
+#meow /\ | (
¿??€/+meowingVolume >> 0\ | (
¡<=/"*silence*"!;
) ?>$/+meowingVolume >> 0\ | (
¡<=/"mow"\!;
) ?>$/+meowingVolume >> 2\ | (
¡<=/"meow"\!;
) ?>$/+meowingVolume >> 5\ | (
¡<=/"Meow."\!;
) ?>$/+meowingVolume >> 10\ | (
¡<=/"Meow!!"\!;
) ?>$/+meowingVolume >> 20\ | (
¡<=/"MEOW!!!"\!;
) >? | (
!<=/"Error: weird as fuck meowing volume."\!;
)
)
)

View file

@ -1,5 +1,6 @@
#mult /}}string{{str\ /{float}num\ | #mult /}}string{{str\ /{float}num\ | (
¿string * float? ¿string * float?
)
&& rest line comment && rest line comment
@ -34,26 +35,25 @@
&& = is equal to === && = is equal to ===
&& if condition is true log the text && if condition is true log the text
¿??$/condition\ | ¿??$/condition\ | (
¡<=/"condition was true"! ¡<=/"condition was true"!
? )?
&& if condition is false log the text && if condition is false log the text
¿??€/condition\ | ¿??€/condition\ | (
¡<=/"condition was false"! ¡<=/"condition was false"!
? )?
¿??$/condition\ |
¡<=
#sub /\ | ( #sub /\ | (
&& This code prints hello world && This code prints hello world
¿??$? | ¿??$? | (
!<= "Hello World"!; !<= "Hello World"!;
)
) )
#sub /\ | ( #sub /\ | (
&& This code checks if input is equal to another string && This code checks if input is equal to another string
¿??$ /=> "hello"\? | && Takes input and compares to string ¿??$ /=> "hello"\? | ( && Takes input and compares to string
!<= "World!"!; Prints World! !<= "World!"!; Prints World!
)?
) )