| Home CBM ASCII-X BASIC Disk Commands Enter RUN mode Program Format Secret Variables Variable Format Expressions Keywords (divide) (equal) (less) (minus) (more) (multiply) (plus) (power) Abs And Append Asc Atn Auto Backup Bank Begin Bend Bload Boot Box Bsave Bump Catalog Char Chr Circle Close Clr Cmd Collect Collision Color Concat Cont Copy Cos Data Dclear Dclose Dec Def Delete Dim Directory Dispose Dload Do Dopen Draw Ds Ds string Dsave Dverify El Else End Envelope Er Err Exit Exp Fast Fetch Filter Fn For Fre Get Get num Getkey Go Gosub Goto Graphic Gshape Header Help Hex If Input Input num Instr Int Joy Key Left Len Let List Load Locate Log Loop Mid Monitor Movspr New Next Not Off On Open Or Paint Peek Pen Pi Play Pointer Poke Pos Pot Print num Pudef Quit Rclr Rdot Read Record Rem Rename Renumber Restore Resume Return Rgr Right Rlum Rnd Rreg Rspcolor Rsppos Rsprite Run Rwindow Save Scale Scnclr Scratch Sgn Sin Sleep Slow Sound Spc Sprcolor Sprdef Sprite Sprsav Sqr Sshape St Stash Step Stop Str Swap Sys Tab Tan Tempo Then Ti Ti string To Trap Troff Tron Until Using Usr Val Verify Vol Wait While Width Window Xor Syntax Tokens C128 D64plus Disk Escape Codes Hardware PCxface PETSCII Pet2asc Futurama IBM PC-AT Contact Games Glossary Hall of fame Hall of shame Miscellaneous Privacy policy Programming Twisty puzzles |
Note the 'token' is really the character codes of the keyword.
EL
Error trapping (and debugging); return the line number of the most recent error.
EL returns the line# of the most recent BASIC program error. A value of 65535 indicates no previous program error. The value is set to "no program error" on power-up and whenever CLR is executed (performed as a part of NEW and RUN commands and, in direct mode, (D)LOAD). The value is also (usually) set when an error occurs in a program. Exceptions are the special (untrappable) errors of INPUT: EXTRA IGNORED and REDO FROM START. EL is never updated by an error in direct mode. EL is typically used in a program's TRAP handler to determine where an error occured. Although the errorNumber is available from reserved variable ER, it is common to recover from the same type of error (same errorNumber) in different ways, depending on where (which line#) the error occured in the program. It may occassionaly be useful in direct mode while debugging in order to recall the line# of the last error (for example if a displayed error message scrolls off the screen while listing program lines). Like all BASIC variables, only the first two characters of the name are significant. So you may also append extra characters; you could use the name ELINE if you prefer (note the -INE would be superfluous). Like most reserved variables, a SYNTAX ERROR will be generated if you attempt to assign a value to EL. On the CBM-II series, EL is only valid in a program. In direct mode it always reads 65535 (no error line). Examples (version 3.5 and 7.0):
© H2Obsession, 2014 |