Defines a set of lines as executable program code.
Prgm
program code
EndPrgm
Menu Location
Press:
- Catalog ([2nd] + 2 on 92/+/v200) to access the catalog menu
- P to scroll to the P section
- Use arrows to navigate to Prgm
Or type Prgm using the keyboard
This command works on all calculators.
4 bytes
This command is used at the beginning/end of a program to tell the calculator to interpret it as code. Without these commands at the start and end of a program file, the interpreter will pass a syntax error.
:test()
:Prgm
://code to run goes here
:EndPrgm
Advanced Uses
Using the local and define commands, you can create local submethods in your programs. This is more often used with functions, as you can return a value, however you can not display to the IO or draw to the graph screen in functions, so using programs in this way is sometimes useful. Assuming the following code is inside a program block already, the syntax would be:
:Local test
:Define test()=Prgm
://test program code goes here
:EndPrgm