strath/sm-test-files/animals-example/cat.sm

37 lines
722 B
Text
Raw Normal View History

2021-12-16 09:38:27 +00:00
&& 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\? | (
2021-12-16 09:38:27 +00:00
¡<=/"*silence*"!;
)
?>$/+meowingVolume >> 0\? | (
2021-12-16 09:38:27 +00:00
¡<=/"mow"\!;
)
?>$/+meowingVolume >> 2\? | (
2021-12-16 09:38:27 +00:00
¡<=/"meow"\!;
)
?>$/+meowingVolume >> 5\? | (
2021-12-16 09:38:27 +00:00
¡<=/"Meow."\!;
)
?>$/+meowingVolume >> 10\? | (
2021-12-16 09:38:27 +00:00
¡<=/"Meow!!"\!;
)
?>$/+meowingVolume >> 20\? | (
2021-12-16 09:38:27 +00:00
¡<=/"MEOW!!!"\!;
)
2021-12-16 10:38:49 +00:00
>?/\? | (
2021-12-16 09:38:27 +00:00
!<=/"Error: weird as fuck meowing volume."\!;
)
)