User Tools

Site Tools


data_begin_routine_local_data_section_.htm
Navigation:  Language Reference > 2 - Program Source Code Format > Program Format >====== DATA (begin routine local data section) ====== Previous pageReturn to chapter overviewNext page

            DATA

The DATA statement begins a local data declaration section in a ROUTINE. Any ROUTINE containing a DATA section must also contain a CODE statement to terminate the data declaration section. Variables declared in a ROUTINE data section may not have the STATIC or THREAD attributes.

Example:

SomeProc PROCEDURE

CODE

!Code statements

DO Tally                !Call the routine

!More code statements

Tally ROUTINE            !Begin routine, end procedure

DATA

CountVar BYTE            !Declare local variable

CODE

CountVar += 1           ! increment counter

DO CountItAgain         !Call another routine

EXIT                    !and exit the routine

See Also:

CODE

ROUTINE

data_begin_routine_local_data_section_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1