An HP 39g/40g program contains a sequence of numbers, mathematical expressions, and commands that execute automatically to perform a task. These items are each separated by a colon. Commands that take multiple arguments have those arguments separated by a semicolon.
Inside a program, branching structures can be used to control the execution flow. Creating building-block programs enables structured programming to be used. Each building-block program stands alone and can be called from other programs.
note:Program names containing spaces must be typed in quotes in order to run the program.