Special variables: Difference between revisions

no edit summary
(Added Dyalect programming language)
No edit summary
Line 1,283:
 
All other S-variables have implementation defined meanings.</lang>
 
=={{header|Nanoquery}}==
Nanoquery has a number of immutable special variables which can be listed by executing the following program:
<lang nanoquery>println dumpstack()</lang>
{{out}}
<pre>{{dbsize, 0}, {col, 1}, {workingdir, C:\Users\Will\Programs\Nanoquery}, {false, false}, {interactive, false}, {main, true}, {packages, [, Nanoquery.Objects, Nanoquery.Exceptions]}, {libpath, C:\Users\Will\Programs\Nanoquery\nanoquery-2.3_1866}, {args, [-b, rosetta-code/specialvars.nq]}, {rec, 1}, {filename, }, {null, null}, {__file__, C:\Users\Will\Programs\Nanoquery\rosetta-code\specialvars.nq}, {true, true}, {prompt, [\S | rec\R col\C] % }, {cols, 0}, {lockedfiles, []}, {__calls__, [<global>:1]}}</pre>
 
These variables are:
<pre>dbsize: the amount of rows in the currently referenced database object
col: the index of the currently referenced database column
workingdir: the current working directory as a string
false: the boolean value false
interactive: a boolean that represents if this program is being run from the
interpreter interactively
main: boolean that represents if this code is in the global portion
of the current program
packages: list of strings holding the built-in packages that have been imported
libpath: string representing the path where the standard library is expected to be
args: list of string containing the args that the current program was
started with
rec: the index of the currently referenced database row
filename: the path of the currently open database file
null: represents the null object
__file__: absolute path of the current running program
true: the boolean value true
prompt: contains the current interpreter prompt string
cols: the amount of columns in the currently referenced database object
lockedfiles: list of strings containing the paths of files that have been locked
for writing by the 'lock' command
__calls__: stack containing the current Nanoquery call stack</pre>
 
=={{header|NetRexx}}==
Anonymous user