INCLAN: intrinsics
Jump to navigation
Jump to search
The following functions can be used in FORTRAN-77 expressions in addition to the standard FORTRAN-77 intrinsic functions or anywhere on the command line in the form $function(parameter,parameter,...) if there are parameters or in the form $function without parameters. In the alphabetical list below, i and n denote integer expressions, and s and t denote character expressions. The result type of the function is given in parentheses.
- cputime
- CPU time in seconds since the start of the program (real)
- date
- current date in the form dd-mm-yy (character)
- def(s)
- does a variable with name s exist and have a value different from NULL? (logical)
- exist(s)
- does a variable with name s exist? (logical)
- existfile(s)
- does a file with name s exist? (logical)
- external(s)
- value of the external (i.e. non-local) variable with name s (even if it is hidden by a local variable with the same name), or a blank string if no external variable with this name exists. (character)
- external(s,t)
- value of the external (i.e. non-local) variable with name s (even if it is hidden by a local variable with the same name), or t if no external variable with this name exists. (character)
- fitchisq
- χ2 value of the last linear least-squares fit (real)
- fiterr(n)
- standard deviation of the n-th fit parameter of the last linear least-squares fit (real)
- fitpar(n)
- optimal value of the n-th fit parameter of the last linear least-squares fit (real)
- fitprob
- probability that the χ2 value of the lastlinear least-squares fit would be exceeded by chance (real)
- getenv(s)
- value of Unix environment variable with name s (character)
- getpid
- Unix PID of current process (integer)
- global(s)
- value of the global with name s (even if it is hidden by a local variable with the same name), or a blank string if no global variable with this name exists. (character)
- global(s,t)
- value of the global with name s (even if it is hidden by a local variable with the same name), or t if no global variable with this name exists. (character)
- if(n,x1,x2)
- argument x1 if the condition n is true, or x2 otherwise. The arguments x1 and x2 can have any type.
- length(s)
- number of elements of the variable with name s (integer)
- lenstr(s)
- length of string s (without trailing blanks) (integer)
- macro(s)
- does a macro with name s exist in the search path? (logical)
- match(s,t)
- does the string s match the string t? The string t may contain wildcards: an asterisk matches zero or more characters, and a question mark matches exactly one character. (logical)
- mtime(s)
- time of last modification (in seconds since a reference date) of the file with name s (integer)
- opened(s)
- is the file with name s open? (logical)
- plotx0, ploty0, plotx1, ploty1
- coordinates of the two reference points in the user coordinate system used for graphics (real)
- rand
- random number between 0 and 1 (real)
- rand(i)
- random number between 0 and 1, using seed i (real)
- rand(i,n)
- n-th random number between 0 and 1, using seed i (real)
- time
- current time in the form hh:mm:ss (character)
- val(s)
- value of the variable with name s, or a blank string if no variable with this name exists. (character)
- val(s,t)
- value of thevariable with name s, or t if no variable with this name exists. (character)
- walltime
- wallclock time in s since the start of the program (integer)