RosettaCodeData/Task/Sort-three-variables/Quackery/sort-three-variables.quackery
2023-07-01 13:44:08 -04:00

29 lines
540 B
Text

[ stack ] is x
[ stack ] is y
[ stack ] is z
$ 'lions, tigers, and' x put
$ 'bears, oh my!' y put
$ '(from the "Wizard of OZ")' z put
x take y take z take
3 pack sortwith $> unpack
z put y put x put
say " x = " x take echo$ cr
say " y = " y take echo$ cr
say " z = " z take echo$ cr
cr
77444 x put
-12 y put
0 z put
x take y take z take
3 pack sortwith > unpack
z put y put x put
say " x = " x take echo cr
say " y = " y take echo cr
say " z = " z take echo cr