System Functions
LST( ) Return List Form of Statement
 
Formats LST([EDIT][*]internal$[,ERR=stmtref])
 
Where:
 
* Asterisk. Returns the listing in colourized syntax.
 
EDIT Keyword indicating that listing is to be returned with indented format.
 
internal$ Character string containing the internal (compiled) form of a ProvideX
statement. String expression; e.g., X$=LST(PGM(10)).
 
stmtref Program line number or statement label to which to transfer control.
 
Returns List format from compiled statement.
 
Description The LST( ) function converts a ProvideX statement from internal form to normal source format. You must ensure that the string processed by the LST( ) function is a statement in valid internal form. If it is not valid, ProvideX returns either Error
#30: Statement too complex -- cannot compileor Error #49: <*> Internal program format error <*>.
Use the EDIT keyword to return a formatted statement and the asterisk * to display colourized syntax (the 'CS' parameter must be on); e.g.,
X$=LST(EDIT *PGM(10)).


*Note* There is a *CMD command line utility called COLOUR (or COLOR) that can be used to display or alter the current settings. Typing COLOUR or COLOR at a ProvideX prompt will display online help for this utility.


 
See Also '*H' Mnemonic
'CS' System Parameter
 
Examples 0030 INPUT "Enter statement to display:",A
0035 IF A=0 THEN GOTO 2000
0040 LET X$=PGM(A,ERR=1000)
0050 PRINT LST(X$)
0060 GOTO 0030
1000 PRINT "Cannot find statement"
1010 GOTO 0030
2000 PRINT "DONE"; STOP
-:run
Enter statement to display:50
0050 PRINT LST(X$)
Enter statement to display: DONE