ProvideX V8.20 > Language Reference > 2. Directives
195
LOAD DATA  Directive
            Load Program Constants
Format
LOAD DATA filename$ [,ERR=stmtref]
Where:
filename
Name of Variable Definition file in which to store constant.
stmtref
Program line number or label to transfer control to.
Description
This directive loads into memory the contents of a Variable Definition file (created
via the SAVE DATA directive). These variables are read-only, and any attempt to
change them will result in an Error #61: Authorization failure. Global
variables are not supported.
See Also
SAVE DATA Save Program Constants, p.295.
Example
COMPANY$="ABC Company"
DIVISION$="Laundry Division"
COMPANY_CODE=1
SAVE DATA "CO_DATA",COMPANY$,DIVISION$,COMPANY_CODE
START
LOAD DATA "CO_DATA"
DUMP
! ERR=0, CTL=0, RET=2
! Level=1
! PGN="<Unsaved>"
!  Loaded data....CO_DATA (C:\Documents and Settings\Default
User\Application Data\CO_DATA)
COMPANY$="ABC Company"
DIVISION$="Laundry Division"
COMPANY_CODE=1
COMPANY_CODE=2
Error #61: Authorization failure