Special variables: Difference between revisions

Special variables in FreeBASIC
m (syntax highlighting fixup automation)
(Special variables in FreeBASIC)
Line 717:
...etc.</syntaxhighlight>
ERR is a special name, but only inside the context of the INQUIRE (and OPEN, and WRITE, ''etc.'') statement, it is not the name of an existing variable outside that statement whether defined by the language or by the programmer, and if the programmer were to define a variable called ERR it would have no relevance within that INQUIRE statement - though <code>ERR = ERR</code> ''would'' be workable if an ASSIGN statement had assigned statement label 666 to variable ERR. Similarly, the variable named FILENAME is declared by the programmer and because there are no reserved words, could be just FILE. Likewise, EXIST is declared (as LOGICAL) and IOSTAT (as INTEGER) as a mnemonic aid and also to save on the trouble of remembering whether the assignment works left-to-right or right-to-left in each case. It is right-to-left for FILE = ''filename'', input to the INQUIRE statement and left-to-right for EXIST = ''variable'', an output of the INQUIRE statement.
 
=={{header|FreeBASIC}}==
FreeBASIC has no 'special variables'.
 
=={{header|Go}}==
2,133

edits