# Programming Functions Cheatsheet ## Basic Output `alert( el )` : Alerts `el` to the user in a pop-up alert box. `print( el )` : Prints `el` to the screen `println( el )` : Prints `el` to the screen with a trailing line break ## Basic Input `user_string( question )` : Asks the user `question` and returns the result as a string. `user_boolean( question )` : Asks the user `question` and presents an "Ok"/"Cancel" dialogue box. Returns true if the user clicks "Ok" and false otherwise. `user_int( question )` : Asks the user `question` until an integer response is received. ## Basic Utilities `random_number( max )` : Returns a random integer from 0 to `max` (inclusive) `is_int( n )` : returns whether or not `n` is an integer. - - - Author: Ryan Timmons Last Modified: 06 August 2008 15:23:13 PDT URL: Also see the HTML version by changing the file extension to `.html`.