Variable$

From BR Wiki
Jump to navigation Jump to search
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