Skip to content

The Prgm...EndPrgm Command Block

Command Summary Command Syntax Calculator Compatibility Token Size
Defines a set of lines as executable program code. Prgm
program code
EndPrgm
This command works on all calculators. 4 bytes

Press:
1. Catalog ([2nd] + 2 on 92/+/v200) to access the catalog menu
2. P to scroll to the P section
3. Use arrows to navigate to Prgm
Or type Prgm using the keyboard

The Prgm...EndPrgm Command Block

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 68k:local and 68k: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

Authors: KG