11.11 – FIND_FIRST_BIT_SET
The FIND_FIRST_BIT_SET function locates the first bit in a Boolean array whose value is 1 and returns an integer value that specifies the index into the array. Syntax: FIND_FIRST_BIT_SET( vector [[, start_index]] ) The 'vector' parameter is a variable of type PACKED ARRAY OF BOOLEAN with an INTEGER index type. The optional 'start-index' parameter must be an expression of an integer type that indexes the element at the point at which the search starts. The 'starting index' must be greater than or equal to the vector's lower bound, and less than or equal to 1 plus the vector's upper bound; otherwise, a range violation occurs. If omitted, the starting index defaults to the vector's first element. The FIND_FIRST_BIT_SET function returns an integer value indexing the first element containing the value 1. If no bit is 1, the result is 1 plus the vector's upper bound. If the vector or the indexed part of the vector has a size of 0, the result is start-index.
11.12 – GETTIMESTAMP
The GETTIMESTAMP procedure initializes its parameter for use with the DATE and TIME functions. Syntax: GETTIMESTAMP( t [[, str]] ) The parameter 't' is a variable of the TIMESTAMP type, which is a predeclared record type. The TIMESTAMP data type is as follows: TIMESTAMP = PACKED RECORD Datevalid, Timevalid : BOOLEAN; Year : INTEGER; Month : 1..12; Day : 1..31; Hour : 0..23; Minute : 0..59; Second : 0..59; Hundredth : 0..99; {64-bit OpenVMS binary time:} BINARY_TIME : [QUAD] RECORD L1,L2 : INTEGER END; DAY_OF_WEEK : 1..7; {1 is Monday, 7 is Sunday} END; The parameter 'str' is a string type that represents a date or both a date and time. The following rules apply to the specification of the 'str' parameter: o If you do not specify the 'str', the GETTIMESTAMP procedure initializes the variable to be the date and time at execution of your program. o If you specify an invalid date, the GETTIMESTAMP procedure sets the date to be January 1, 1; if you specify an invalid time, it sets the time to be midnight.
11.13 – HALT
The HALT procedure uses operating system resources to stop execution of your program unless you have written a condition handler (using the ESTABLISH procedure) that enables continued execution.
11.14 – IN_RANGE
The IN_RANGE function determines whether a value is in the defined subrange. Syntax: IN_RANGE(expression,lower-expression,upper-expression) This function returns TRUE if the contents of the variable is in the range specified by the lower-expression and upper-expression values.
11.15 – ODD
The ODD function returns a Boolean value that indicates if the parameter is odd. Syntax: ODD( x ) The parameter 'x' must be of type INTEGER or UNSIGNED. The function returns TRUE if the value of 'x' is odd and FALSE if the value of 'x' is even.
11.16 – RANDOM
The RANDOM function returns a randomly computed real value in the range [0.0,1.0). RANDOM[[(expression)]] If present, the optional integer parameter is ignored.
11.17 – RENAME_FILE
The RENAME_FILE procedure renames a file. Syntax: RENAME_FILE( old-file-name, new-file-name [, error-return] ) The parameter 'old-file-name' specifies the names of one or more files whose specifications are to be changed. The parameter 'new-file-name' provides the new file specification to be applied. The 'error-return' parameter contains an error recovery code if specified.
11.18 – REVERT
The REVERT procedure cancels a condition handler activated by the ESTABLISH procedure. This procedure does not have a parameter list.
11.19 – SEED
The SEED function has a single integer parameter that sets the random number generator seed for the RANDOM function. The function returns an integer that represents the previous seed value. SEED(expression) The parameter is of type integer.
11.20 – SYSCLOCK
The SYSCLOCK function returns an integer value for the number of milliseconds of system time used by the current process. On OpenVMS systems, the result is the same as that returned by the CLOCK function. Syntax: SYSCLOCK
11.21 – UNDEFINED
The UNDEFINED function returns a Boolean value that specifies whether the parameter contains a reserved operand. Syntax: UNDEFINED( x ) The parameter 'x' must be a variable of type REAL, SINGLE, DOUBLE, or QUADRUPLE. The function returns TRUE if 'x' contains a value that has been reserved by the system or machine architecture. If 'x' does not contain a reserved value, the function returns FALSE. If 'x' contains a reserved operand and if you attempt to use 'x' in arithmetic computations, an error occurs.
11.22 – WALLCLOCK
On OpenVMS systems, the WALLCLOCK function returns an integer value representing the number of seconds since the boot time for the system. Syntax: WALLCLOCK
11.23 – ZERO
The ZERO function returns data, whose type depends on the context of the function call, that sets any variable (except a file variable) to its binary zero. If you attempt to use the ZERO function to initialize a file variable, an error occurs. Do not specify a parameter list when you call the ZERO function.