RosettaCodeData/Task/Sort-three-variables/SenseTalk/sort-three-variables.sensetalk

41 lines
690 B
Plaintext

Set x to "lions, tigers and"
Set y to "bears, oh my!"
Set z to "(from the Wizard of Oz)"
log x
log y
log z
set RosettaListAlpha to (x,y,z)
log RosettaListAlpha
sort RosettaListAlpha alphabetically
log RosettaListAlpha
LogSuccess "Alphabetical Sort Successful"
set (x,y,z) to RosettaListAlpha
log x
log y
log z
LogSuccess "Sorted Items back into Original Variables"
Set a to "77444"
set b to "-12"
set c to "0"
set d to "62224"
set RosettaListNum to (a,b,c,d)
log RosettaListNum
sort RosettaListNum numerically
log RosettaListNum
LogSuccess "Numerical Sort Successful"
set (a,b,c,d) to RosettaListNum
log a
log b
log c
log d
LogSuccess "Sorted Numbers back into Original Variables"