| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
$G) This command lets you assign a variable from console. It is typically used to let the user enter experiment parameters at run time, such as entering a variable (using the keyboard) at the start of a testlist.
An integer value is read from the keyboard; the specified variable is set to the value read. This command will skip leading whitespace, and will set the variable to zero if the input could not be converted to a valid number.
The user can backspace over typed characters, however instead of characters disappearing, the deleted character will appear inside of two slashes '/x/'. This is because the character-grabbing routine has no idea where the character was displayed on the screen.
$G
$Gv1
@CPress any key to assign an integer value to the Cogsys variable V12 (\$GV12)#R Enter an integer number: $GV12 @1010 Variable V12 now has value $SV12 @1210 Press any key to exit.#R#S/V12 is ^V12/ |
$GV12
V12