How to resolve the algorithm Special variables step by step in the Icon and Unicon programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Special variables step by step in the Icon and Unicon programming language

Table of Contents

Problem Statement

Special variables have a predefined meaning within a computer programming language.

List the special variables used within the language.

Let's start with the solution:

Step by Step solution about How to resolve the algorithm Special variables step by step in the Icon and Unicon programming language

Source code in the icon programming language

# &keyword # type returned(indicators) - brief description
# indicators:
#    * - generates multiple values
#    = - modifiable
#    ? - may fail (e.g. status inquiry)
#    U - Unicon
#    G - Icon or Unicon with Graphics
#
&allocated   # integer(*) - report memory allocated in total and by storage regions
&ascii       # cset -  ASCII character set
&clock       # string - time of day
&col         # integer(=G) - column location of pointer
&collections # integer(*) - garbage collection activity in total and by storage region
&column      # integer(U) - source code column
&control     # null(?G) - control key state
&cset        # cset - universal character set
&current     # co-expression - current co-expression
&date        # string - today's date
&dateline    # string - time stamp
&digits      # cset - digit characters
&dump        # integer(=) - termination dump
&e           # real - natural log e
&error       # integer(=) - enable/disable error conversion/fail on error
&errno       # integer(?) - variable containing error number from previous posix command
&errornumber # integer(?) - error number of last error converted to failure
&errortext   # string(?) - error message of last error converted to failure
&errorvalue  # any(?) - erroneous value of last error converted to failure
&errout      # file - standard error file
&eventcode   # integer(=U) - program execution event in monitored program
&eventsource # co-expression(=U) - source of events in monitoring program
&eventvalue  # any(=U) - value from event in monitored program
&fail        # none - always fails
&features    # string(*) - identifying features in this version of Icon/Unicon
&file        # string -  current source file
&host        # string - host machine name
&input       # file - standard input file
&interval    # integer(G) - time between input events
&lcase       # cset - lowercase letters
&ldrag       # integer(G) - left button drag
&letters     # cset - letters
&level       # integer - call depth
&line        # integer - current source line number
&lpress      # integer(G) - left button press
&lrelease    # integer(G) - left button release
&main        # co-expression - main task
&mdrag       # integer(G) - middle button drag
&meta        # null(?G) - meta key state
&mpress      # integer(G) - middle button press
&mrelease    # integer(G) - middle button release
&now         # integer(U) - current time
&null        # null - null value
&output      # file - standard output file
&pick        # string (U) - variable containing the result of 3D selection
&phi         # real - golden ratio
&pos         # integer(=) - string scanning position
&progname    # string(=) - program name
&random      # integer(=) - random number seed
&rdrag       # integer(G) - right button drag
&regions     # integer(*) - region sizes
&resize      # integer(G) - window resize
&row         # integer(=G) - row location of pointer
&rpress      # integer(G) - right button press
&rrelease    # integer(G) - right button release
&shift       # null(?G) - shift key state
&source      # co-expression - invoking co-expression
&storage     # integer(*) - memory in use in each region
&subject     # string - string scanning subject
&syserr      # integer - halt on system error
&time        # integer(=) - elapsed time in milliseconds
&trace       # integer(=) - trace program
&ucase       # cset - upper case letters
&version     # string - version
&window      # window(=G) - the current graphics rendering window
&x           # integer(=G) - pointer horizontal position
&y           # integer(=G) - pointer vertical position
# keywords may also fail if the corresponding feature is not present.
# Other variants of Icon (e.g. MT-Icon) will have different mixes of keywords.


  

You may also check:How to resolve the algorithm Tau function step by step in the BASIC programming language
You may also check:How to resolve the algorithm Color of a screen pixel step by step in the Processing programming language
You may also check:How to resolve the algorithm Reduced row echelon form step by step in the 11l programming language
You may also check:How to resolve the algorithm 100 doors step by step in the Myrddin programming language
You may also check:How to resolve the algorithm Factorial step by step in the Nemerle programming language