Cool stuff, but I miss the "it" variable from HyperTalk (the language used by HyperCard) which contained the result of prompts to the user. Just search for "The it variable":
ask "How many minutes do you want to play?"
put it * 60 into timeToPlay -- convert it into seconds
Today we could have a reserved keyword that holds the result of the last statement executed. A practical example adapted from the article using "it" might look like:
A better name for "it" today might be "_", "result" or perhaps '$' in a shell-inspired language like php. Most shells support "$?" so that could work too:
# prints 0
true ; echo $?
# prints 1
false ; echo $?
http://www.jaedworks.com/hypercard/HT-Masters/scripting.html
Today we could have a reserved keyword that holds the result of the last statement executed. A practical example adapted from the article using "it" might look like: A better name for "it" today might be "_", "result" or perhaps '$' in a shell-inspired language like php. Most shells support "$?" so that could work too: