## COMPILE

PURPOSE:
To add a statement to a program.

    STATEMENT SYNTAX:
    {stno} COMPILE ei_var$,prog_ksa,statement$,line,error_pos{,err=stno}
    where :
    ei_var$ = str var that receives an error structure for use with GETEMESS.
    prog_ksa = reference to the program ksa to which the statement is added.
    statement$ = str var that contains statement to be added.
    line = num var that receives the line #
    error_pos = num var that receives location in statement$ where an error occurred.
    EXAMPLE:
    4200 COMPILE EI$,KSA![""],A$,LINE,EPOS,ERR=.+1;GOTO 4800
    4215 PRINT (0,ERR=.+1)A$
    4220 IF EPOS>LEN(A$) THEN LET EPOS=LEN(A$)
    4225 PRINT @(EPOS),"^"
    4230 GETEMESS EI$,A$,0;PRINT A$,
    4235 GOTO CONMODE_INPUT
    4300 REM No Error

SEE: GETEMESS