Variable$: Difference between revisions

From BR Wiki
Jump to navigation Jump to search
m (moved VARIABLE$ to Variable$ over redirect)
No edit summary
 
Line 1: Line 1:
VARIABLE$
The '''Variable$''' [[internal function]] returns the name of the variable that failed in the last I/O [[statement]]. Besides being invaluable for [[debugging]], Variable$ can be used as a topic to call [[Help$]]. Note: VARIABLE$ will not be set if the error results from the field specification (error numbers 850 through 890). Also, if the field is a calculation such as A+B, Variable$ will not be set.
The '''Variable$''' [[internal function]] returns the name of the variable that failed in the last I/O [[statement]]. Besides being invaluable for [[debugging]], Variable$ can be used as a topic to call [[Help$]]. Note: VARIABLE$ will not be set if the error results from the field specification (error numbers 850 through 890). Also, if the field is a calculation such as A+B, Variable$ will not be set.



Latest revision as of 03:20, 22 May 2014

VARIABLE$

The Variable$ internal function returns the name of the variable that failed in the last I/O statement. Besides being invaluable for debugging, Variable$ can be used as a topic to call Help$. Note: VARIABLE$ will not be set if the error results from the field specification (error numbers 850 through 890). Also, if the field is a calculation such as A+B, Variable$ will not be set.

Example

00010 input a,b,c

If at the command line the user types in

4,5,x

then BR will give an error 726, because "x" is not an acceptable value for the variable c.

If after getting the error, you type in variable$ at the command prompt, the result will be:

c