menu = 1
curhome
cleareos
'                                                      ------------------------'
'You can pass values to I2ICE PROCs using the symbol  | SCRE2: PROCS 2         |'
'"%" followed by a number or the letters "NP". Let''s  | M = Go to AID1 menu    |'
'see how this works with a PROC (named AVERAGE) that  | N = Next screen        |'
'averages three values passed to it.  Enter the       | P = Previous screen    |'
'following:                                           | Q = Quit tutorial      |'
'    DEFINE PROC AVERAGE = DO <Enter>                 | R = Rewrite SCRE2      |'
'    DEFINE BYTE RESULT = 0 <Enter>                   | SCR# = Screen desired  |'
'    RESULT = (%0+%1+%2)/%NP <Enter>                   ------------------------'
'    WRITE ''Result = '', RESULT <Enter>               '
'    END <Enter>'
'Now set the number base equal to 10 and call the PROC by entering'
'    BASE = 10T <Enter>'
'    AVERAGE(9,21,16) <Enter>'
'In a PROC, when the symbol "%" precedes a number, "%number" refers to the'
'input value position in the calling command.  For example, in our PROC,'
'"%0" refers to the first value in the calling command (9), and "%1" refers'
'to the second value (21), and so on.  The symbol "%NP" is equal to the'
'Number of Parameters passed to the PROC (in our case, %NP = 3).'
' '
'-------------- Enter N <Enter> to continue with Aid Module E ------------------'
define literally P   = 'include scrE.1 nolist'
define literally R   = 'include scrE.2 nolist'
define literally N   = 'include scrE.3 nolist'
define literally M   = 'include aid.1 nolist'