RosettaCodeData/Task/Sort-three-variables/Quackery/sort-three-variables.quackery

30 lines
540 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
[ 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