(Go to the Top TDI Reference Page)
Compiling_Intrinsics These routines help with compiling and decompiling: AS_IS COMPILE COMPILE_DEPENDENCY DEBUG DECOMPILE DECOMPILE_DEPENDENCY EVALUATE EXECUTE EXT_FUNCTION REM CALL [notation: image->routine:type(arg...)] In a CALL you can use DESCR REF VAL or XD functions of the arguments. The immediate operator (`) causes one level of evaluation in compiling. The immediate operator must not be used on a COMPILE or EXECUTE because compilation depends on static variables and is not reentrant. A few operation execute immediately on VMS arguments. They include builds, type conversion, and signing. The _OF routines should not have VMS arguments so they are immediate to produce an error. VMS arguments are numbers and text, either static or dynamic, and either scalar or array. Constant_Intrinsics TDISHR permits expressions with some defined or measured constants. These symbolic forms are easier to read and are normally more accurate than you would enter. Major sources: "The 1986 Adjustment of the Fundamental Physical Constants..." by Cohen and Taylor as listed in "Physics Today" August 1990. "1980 Revised NRL Plasma Formulary" by Book. The names appear with a dollar sign ($) and without parentheses.
These routines help with compiling and decompiling: AS_IS COMPILE COMPILE_DEPENDENCY DEBUG DECOMPILE DECOMPILE_DEPENDENCY EVALUATE EXECUTE EXT_FUNCTION REM CALL [notation: image->routine:type(arg...)] In a CALL you can use DESCR REF VAL or XD functions of the arguments. The immediate operator (`) causes one level of evaluation in compiling. The immediate operator must not be used on a COMPILE or EXECUTE because compilation depends on static variables and is not reentrant. A few operation execute immediately on VMS arguments. They include builds, type conversion, and signing. The _OF routines should not have VMS arguments so they are immediate to produce an error. VMS arguments are numbers and text, either static or dynamic, and either scalar or array.
TDISHR permits expressions with some defined or measured constants. These symbolic forms are easier to read and are normally more accurate than you would enter. Major sources: "The 1986 Adjustment of the Fundamental Physical Constants..." by Cohen and Taylor as listed in "Physics Today" August 1990. "1980 Revised NRL Plasma Formulary" by Book. The names appear with a dollar sign ($) and without parentheses.
$MISSING is used internally to mark a missing argument and gives zero or blanks. $MISSING and $ROPRAND execute at compilation.
$NARG is used in a FUN to get the actual number of arguments--thus its value depends on where it is used.
$THIS is set by GET_DATA of a signal or param to that descriptor.
$VALUE is used in the data field of a signal to mean the raw field and in the validation field of a param to mean the value field. $VALUE is like RAW_OF($THIS) for signals and like VALUE_OF($THIS) for params. Elemental_Intrinsics Much of the power of TDISHR comes from working with vectors and arrays just as if they were scalars. For many of the operations, each element of the array is operated on by a function. Data types are matched for functions of more than one argument including matching scalars with arrays and floats with integers. These operations are the elementals. Bit-wise: BTEST IAND IAND_NOT IBCLR IBSET IEOR IEOR_NOT INAND INAND_NOT INOR INOR_NOT INOT IOR IOR_NOT Character: ACHAR ADJUSTL ADJUSTR BUILTIN_OPCODE CHAR CONCAT ELEMENT EXTRACT IACHAR ICHAR INDEX LEN_TRIM LGE LGT LLE LLT REPEAT SCAN STRING_OPCODE TRANSLATE UPCASE VERIFY Conversion: BYTE BYTE_UNSIGNED CMPLX CVT DBLE D_COMPLEX D_FLOAT FLOAT F_COMPLEX F_FLOAT G_COMPLEX G_FLOAT H_COMPLEX H_FLOAT INT INT_UNSIGNED LOGICAL LONG LONG_UNSIGNED OCTAWORD OCTAWORD_UNSIGNED QUADWORD QUADWORD_UNSIGNED REAL SIGNED TEXT UNSIGNED WORD WORD_UNSIGNED Logical: AND AND_NOT EQ EQV FINITE GE GT LE LT MERGE NAND NAND_NOT NE NEQV NOR NOR_NOT NOT OR OR_NOT Mathematical: ACOS ACOSD ARG ARGD ASIN ASIND ATAN ATAN2 ATAN2D ATAND ATANH COS COSD COSH EXP LOG LOG10 LOG2 SIN SIND SINH SQRT TAN TAND TANH Numeric: ABS ABS1 ABSSQ ADD AIMAG AINT ANINT BSEARCH CEILING CONJG DIM DIVIDE DPROD EXPONENT FIX_ROPRAND FLOOR FRACTION ISHFT ISHFTC MAX MIN MOD MULTIPLY NINT POWER RRSPACING SCALE SET_EXPONENT SHIFT_LEFT SHIFT_RIGHT SPACING SQUARE SUBTRACT UNARY_MINUS UNARY_PLUS Variable: POST_DEC POST_INC PRE_DEC PRE_INC The shape of the result is derived from conforming the arguments-- for example, scalar with vector is a vector. A few operations expect arguments that are scalars or tables and cannot conform them: BSEARCH: TABLE, AINT/ANINT/CHAR/CMPLX/FLOAT/INT/NINT/REAL/TEXT: KIND, CVT: MOLD, is_in: SET, REPEAT: NCOPIES. The "signality" of the result is the signality of the dominant shape. Keeping signality is the embedding of an expression using a signal back into its signal form. For example, BUILD_SIGNAL(42*$VALUE,6) + 5, becomes a signal, BUILD_SIGNAL(257,6) when used. The units of the result is the appropriate mixing of the units of the arguments. Inquiry_Intrinsics These routines return information about the system or values: ALLOCATED BIT_SIZE DIGITS ELBOUND EPSILON ESHAPE ESIZE EUBOUND HUGE KIND LBOUND LEN MAXEXPONENT MINEXPONENT PRECISION PRESENT RADIX RANGE RANK SELECTED_INT_KIND SELECTED_REAL_KIND SHAPE SIZE SIZEOF TINY UBOUND IO_Intrinsics Input/output operations interact with the operating system and should be avoided in coding operations for tree expressions because of their side effects. DATE_TIME EXT_FUNCTION FCLOSE FOPEN FSEEK FTELL FSEEK SHOW_PRIVATE SHOW_PUBLIC SPAWN WAIT WRITE >>>>>>>>>WARNING, many of these have side effects. MDS_Intrinsics These operations construct and access MDS and VMS descriptors. MDS Construction: BUILD_ACTION BUILD_CALL BUILD_CONDITION BUILD_CONGLOM BUILD_DEPENDENCY BUILD_DIM BUILD_DISPATCH BUILD_EVENT BUILD_FUNCTION BUILD_METHOD BUILD_PARAM BUILD_PATH BUILD_PROCEDURE BUILD_PROGRAM BUILD_RANGE BUILD_ROUTINE BUILD_SIGNAL BUILD_SLOPE BUILD_WINDOW BUILD_WITH_UNITS MAKE_ACTION MAKE_CALL MAKE_CONDITION MAKE_CONGLOM MAKE_DEPENDENCY MAKE_DIM MAKE_DISPATCH MAKE_FUNCTION MAKE_METHOD MAKE_PARAM MAKE_PROCEDURE MAKE_PROGRAM MAKE_RANGE MAKE_ROUTINE MAKE_SIGNAL MAKE_SLOPE MAKE_WINDOW MAKE_WITH_UNITS Use BUILD_xxx for immediate structure building. (From Build_Call.) Use MAKE_xxx in FUNs for evaluated non-PUBLIC variables. Use this form if IMAGE or ROUTINE must be expressions. MDS Fields: CLASS DSCPTR KIND NDESC ARG_OF AXIS_OF BEGIN_OF CLASS_OF COMPLETION_OF COMPLETION_MESSAGE_OF CONDITION_OF DIM_OF DISPATCH_OF DSCPTR_OF END_OF ERRORLOGS_OF HELP_OF IDENT_OF IMAGE_OF INTERRUPT_OF KIND_OF LANGUAGE_OF METHOD_OF MODEL_OF NAME_OF NDESC_OF OBJECT_OF PERFORMANCE_OF PHASE_OF PROCEDURE_OF PROGRAM_OF QUALIFIERS_OF RAW_OF ROUTINE_OF SLOPE_OF TASK_OF TIME_OUT_OF UNITS_OF VALIDATION_OF VALUE_OF WHEN_OF WINDOW_OF $THIS $VALUE MDS Information: BUILTIN_OPCODE CULL DATA DATA_WITH_UNITS EXTEND GETDBI GETNCI I_TO_X OPCODE_BUILTIN OPCODE_STRING STRING_OPCODE UNITS USING VALIDATION X_TO_I Miscellaneous_Intrinsics These routines do not fall in any other category. ABORT DECOMPRESS fit IF_ERROR SORT SORTVAL >>>>>>>>>WARNING, some have side effects. Statement_Intrinsics These opcodes are similar to C-language statements. BREAK CONTINUE FOR GOTO IF ... ELSE STATEMENT SWITCH WHILE Some are modified to permit proper compilation with a minimum of reserved words. CASE DO LABEL RETURN These are like CC expressions. COMMA CONDITIONAL These are F90-like extensions. CASE DEFAULT >>>>>>>>>WARNING, the "bare" tree names BREAK CONTINUE ELSE (after IF statement) ELSEWHERE (after WHERE statement) will not be acceptable to the compiler. Use a leading colon (:) or choose another name. >>>>>>>>>WARNING, while it is possible to create expressions with a statement subexpression, the result cannot be re-compiled (except for the standard statements) because the semicolon, keyword, or brace is syntactically wrong. Transformation_Intrinsics These operations change information into new blocks of information. Generation: ARRAY BUILD_DTYPE_RANGE DTYPE_RANGE RAMP RANDOM REPLICATE SPREAD VECTOR ZERO Masking: ALL ANY COUNT FIRSTLOC LASTLOC Mathematics: ACCUMULATE Matrix: DIAGONAL DOT_PRODUCT Reduction: MAXLOC MAXVAL MEAN MINLOC MINVAL PRODUCT SUM TRIM Selection: MAP PACK SORT SORTVAL SUBSCRIPT UNION Shaping and typing: SET_RANGE Although a few of these produce the same sized output as their input, the result depend on other elements. (One-for-one operations are elementals.) Variable_Intrinsics Opcodes associated with variables are: ALLOCATED DEALLOCATE FUN PRESENT RESET_PRIVATE RESET_PUBLIC SHOW_PRIVATE SHOW_PUBLIC VAR Variable names may be preceded by PRIVATE or PUBLIC to restrict the search for them. Function descriptions may use IN INOUT OPTIONAL and OUT modes. Of special interest are EQUALS (x=expr) EQUALS_FIRST (x+=expr, etc.) POST_DEC (x--) POST_INC (x++) PRE_DEC (--x) and PRE_INC (++x) and subscripting (x[expr]) and mapping (MAP(x,expr)).
Much of the power of TDISHR comes from working with vectors and arrays just as if they were scalars. For many of the operations, each element of the array is operated on by a function. Data types are matched for functions of more than one argument including matching scalars with arrays and floats with integers. These operations are the elementals. Bit-wise: BTEST IAND IAND_NOT IBCLR IBSET IEOR IEOR_NOT INAND INAND_NOT INOR INOR_NOT INOT IOR IOR_NOT Character: ACHAR ADJUSTL ADJUSTR BUILTIN_OPCODE CHAR CONCAT ELEMENT EXTRACT IACHAR ICHAR INDEX LEN_TRIM LGE LGT LLE LLT REPEAT SCAN STRING_OPCODE TRANSLATE UPCASE VERIFY Conversion: BYTE BYTE_UNSIGNED CMPLX CVT DBLE D_COMPLEX D_FLOAT FLOAT F_COMPLEX F_FLOAT G_COMPLEX G_FLOAT H_COMPLEX H_FLOAT INT INT_UNSIGNED LOGICAL LONG LONG_UNSIGNED OCTAWORD OCTAWORD_UNSIGNED QUADWORD QUADWORD_UNSIGNED REAL SIGNED TEXT UNSIGNED WORD WORD_UNSIGNED Logical: AND AND_NOT EQ EQV FINITE GE GT LE LT MERGE NAND NAND_NOT NE NEQV NOR NOR_NOT NOT OR OR_NOT Mathematical: ACOS ACOSD ARG ARGD ASIN ASIND ATAN ATAN2 ATAN2D ATAND ATANH COS COSD COSH EXP LOG LOG10 LOG2 SIN SIND SINH SQRT TAN TAND TANH Numeric: ABS ABS1 ABSSQ ADD AIMAG AINT ANINT BSEARCH CEILING CONJG DIM DIVIDE DPROD EXPONENT FIX_ROPRAND FLOOR FRACTION ISHFT ISHFTC MAX MIN MOD MULTIPLY NINT POWER RRSPACING SCALE SET_EXPONENT SHIFT_LEFT SHIFT_RIGHT SPACING SQUARE SUBTRACT UNARY_MINUS UNARY_PLUS Variable: POST_DEC POST_INC PRE_DEC PRE_INC The shape of the result is derived from conforming the arguments-- for example, scalar with vector is a vector. A few operations expect arguments that are scalars or tables and cannot conform them: BSEARCH: TABLE, AINT/ANINT/CHAR/CMPLX/FLOAT/INT/NINT/REAL/TEXT: KIND, CVT: MOLD, is_in: SET, REPEAT: NCOPIES. The "signality" of the result is the signality of the dominant shape. Keeping signality is the embedding of an expression using a signal back into its signal form. For example, BUILD_SIGNAL(42*$VALUE,6) + 5, becomes a signal, BUILD_SIGNAL(257,6) when used. The units of the result is the appropriate mixing of the units of the arguments.
These routines return information about the system or values: ALLOCATED BIT_SIZE DIGITS ELBOUND EPSILON ESHAPE ESIZE EUBOUND HUGE KIND LBOUND LEN MAXEXPONENT MINEXPONENT PRECISION PRESENT RADIX RANGE RANK SELECTED_INT_KIND SELECTED_REAL_KIND SHAPE SIZE SIZEOF TINY UBOUND
Input/output operations interact with the operating system and should be avoided in coding operations for tree expressions because of their side effects. DATE_TIME EXT_FUNCTION FCLOSE FOPEN FSEEK FTELL FSEEK SHOW_PRIVATE SHOW_PUBLIC SPAWN WAIT WRITE >>>>>>>>>WARNING, many of these have side effects.
These operations construct and access MDS and VMS descriptors.
MDS Construction: BUILD_ACTION BUILD_CALL BUILD_CONDITION BUILD_CONGLOM BUILD_DEPENDENCY BUILD_DIM BUILD_DISPATCH BUILD_EVENT BUILD_FUNCTION BUILD_METHOD BUILD_PARAM BUILD_PATH BUILD_PROCEDURE BUILD_PROGRAM BUILD_RANGE BUILD_ROUTINE BUILD_SIGNAL BUILD_SLOPE BUILD_WINDOW BUILD_WITH_UNITS MAKE_ACTION MAKE_CALL MAKE_CONDITION MAKE_CONGLOM MAKE_DEPENDENCY MAKE_DIM MAKE_DISPATCH MAKE_FUNCTION MAKE_METHOD MAKE_PARAM MAKE_PROCEDURE MAKE_PROGRAM MAKE_RANGE MAKE_ROUTINE MAKE_SIGNAL MAKE_SLOPE MAKE_WINDOW MAKE_WITH_UNITS Use BUILD_xxx for immediate structure building. (From Build_Call.) Use MAKE_xxx in FUNs for evaluated non-PUBLIC variables. Use this form if IMAGE or ROUTINE must be expressions. MDS Fields: CLASS DSCPTR KIND NDESC ARG_OF AXIS_OF BEGIN_OF CLASS_OF COMPLETION_OF COMPLETION_MESSAGE_OF CONDITION_OF DIM_OF DISPATCH_OF DSCPTR_OF END_OF ERRORLOGS_OF HELP_OF IDENT_OF IMAGE_OF INTERRUPT_OF KIND_OF LANGUAGE_OF METHOD_OF MODEL_OF NAME_OF NDESC_OF OBJECT_OF PERFORMANCE_OF PHASE_OF PROCEDURE_OF PROGRAM_OF QUALIFIERS_OF RAW_OF ROUTINE_OF SLOPE_OF TASK_OF TIME_OUT_OF UNITS_OF VALIDATION_OF VALUE_OF WHEN_OF WINDOW_OF $THIS $VALUE MDS Information: BUILTIN_OPCODE CULL DATA DATA_WITH_UNITS EXTEND GETDBI GETNCI I_TO_X OPCODE_BUILTIN OPCODE_STRING STRING_OPCODE UNITS USING VALIDATION X_TO_I Miscellaneous_Intrinsics These routines do not fall in any other category. ABORT DECOMPRESS fit IF_ERROR SORT SORTVAL >>>>>>>>>WARNING, some have side effects. Statement_Intrinsics These opcodes are similar to C-language statements. BREAK CONTINUE FOR GOTO IF ... ELSE STATEMENT SWITCH WHILE Some are modified to permit proper compilation with a minimum of reserved words. CASE DO LABEL RETURN These are like CC expressions. COMMA CONDITIONAL These are F90-like extensions. CASE DEFAULT >>>>>>>>>WARNING, the "bare" tree names BREAK CONTINUE ELSE (after IF statement) ELSEWHERE (after WHERE statement) will not be acceptable to the compiler. Use a leading colon (:) or choose another name. >>>>>>>>>WARNING, while it is possible to create expressions with a statement subexpression, the result cannot be re-compiled (except for the standard statements) because the semicolon, keyword, or brace is syntactically wrong. Transformation_Intrinsics These operations change information into new blocks of information. Generation: ARRAY BUILD_DTYPE_RANGE DTYPE_RANGE RAMP RANDOM REPLICATE SPREAD VECTOR ZERO Masking: ALL ANY COUNT FIRSTLOC LASTLOC Mathematics: ACCUMULATE Matrix: DIAGONAL DOT_PRODUCT Reduction: MAXLOC MAXVAL MEAN MINLOC MINVAL PRODUCT SUM TRIM Selection: MAP PACK SORT SORTVAL SUBSCRIPT UNION Shaping and typing: SET_RANGE Although a few of these produce the same sized output as their input, the result depend on other elements. (One-for-one operations are elementals.) Variable_Intrinsics Opcodes associated with variables are: ALLOCATED DEALLOCATE FUN PRESENT RESET_PRIVATE RESET_PUBLIC SHOW_PRIVATE SHOW_PUBLIC VAR Variable names may be preceded by PRIVATE or PUBLIC to restrict the search for them. Function descriptions may use IN INOUT OPTIONAL and OUT modes. Of special interest are EQUALS (x=expr) EQUALS_FIRST (x+=expr, etc.) POST_DEC (x--) POST_INC (x++) PRE_DEC (--x) and PRE_INC (++x) and subscripting (x[expr]) and mapping (MAP(x,expr)).
Use BUILD_xxx for immediate structure building. (From Build_Call.) Use MAKE_xxx in FUNs for evaluated non-PUBLIC variables. Use this form if IMAGE or ROUTINE must be expressions.
MDS Fields:
MDS Information:
Miscellaneous_Intrinsics These routines do not fall in any other category. ABORT DECOMPRESS fit IF_ERROR SORT SORTVAL >>>>>>>>>WARNING, some have side effects. Statement_Intrinsics These opcodes are similar to C-language statements. BREAK CONTINUE FOR GOTO IF ... ELSE STATEMENT SWITCH WHILE Some are modified to permit proper compilation with a minimum of reserved words. CASE DO LABEL RETURN These are like CC expressions. COMMA CONDITIONAL These are F90-like extensions. CASE DEFAULT >>>>>>>>>WARNING, the "bare" tree names BREAK CONTINUE ELSE (after IF statement) ELSEWHERE (after WHERE statement) will not be acceptable to the compiler. Use a leading colon (:) or choose another name. >>>>>>>>>WARNING, while it is possible to create expressions with a statement subexpression, the result cannot be re-compiled (except for the standard statements) because the semicolon, keyword, or brace is syntactically wrong. Transformation_Intrinsics These operations change information into new blocks of information. Generation: ARRAY BUILD_DTYPE_RANGE DTYPE_RANGE RAMP RANDOM REPLICATE SPREAD VECTOR ZERO Masking: ALL ANY COUNT FIRSTLOC LASTLOC Mathematics: ACCUMULATE Matrix: DIAGONAL DOT_PRODUCT Reduction: MAXLOC MAXVAL MEAN MINLOC MINVAL PRODUCT SUM TRIM Selection: MAP PACK SORT SORTVAL SUBSCRIPT UNION Shaping and typing: SET_RANGE Although a few of these produce the same sized output as their input, the result depend on other elements. (One-for-one operations are elementals.) Variable_Intrinsics Opcodes associated with variables are: ALLOCATED DEALLOCATE FUN PRESENT RESET_PRIVATE RESET_PUBLIC SHOW_PRIVATE SHOW_PUBLIC VAR Variable names may be preceded by PRIVATE or PUBLIC to restrict the search for them. Function descriptions may use IN INOUT OPTIONAL and OUT modes. Of special interest are EQUALS (x=expr) EQUALS_FIRST (x+=expr, etc.) POST_DEC (x--) POST_INC (x++) PRE_DEC (--x) and PRE_INC (++x) and subscripting (x[expr]) and mapping (MAP(x,expr)).
These routines do not fall in any other category. ABORT DECOMPRESS fit IF_ERROR SORT SORTVAL >>>>>>>>>WARNING, some have side effects.
These opcodes are similar to C-language statements. BREAK CONTINUE FOR GOTO IF ... ELSE STATEMENT SWITCH WHILE Some are modified to permit proper compilation with a minimum of reserved words. CASE DO LABEL RETURN These are like CC expressions. COMMA CONDITIONAL These are F90-like extensions. CASE DEFAULT >>>>>>>>>WARNING, the "bare" tree names BREAK CONTINUE ELSE (after IF statement) ELSEWHERE (after WHERE statement) will not be acceptable to the compiler. Use a leading colon (:) or choose another name. >>>>>>>>>WARNING, while it is possible to create expressions with a statement subexpression, the result cannot be re-compiled (except for the standard statements) because the semicolon, keyword, or brace is syntactically wrong.
These operations change information into new blocks of information. Generation: ARRAY BUILD_DTYPE_RANGE DTYPE_RANGE RAMP RANDOM REPLICATE SPREAD VECTOR ZERO Masking: ALL ANY COUNT FIRSTLOC LASTLOC Mathematics: ACCUMULATE Matrix: DIAGONAL DOT_PRODUCT Reduction: MAXLOC MAXVAL MEAN MINLOC MINVAL PRODUCT SUM TRIM Selection: MAP PACK SORT SORTVAL SUBSCRIPT UNION Shaping and typing: SET_RANGE Although a few of these produce the same sized output as their input, the result depend on other elements. (One-for-one operations are elementals.)
Opcodes associated with variables are: ALLOCATED DEALLOCATE FUN PRESENT RESET_PRIVATE RESET_PUBLIC SHOW_PRIVATE SHOW_PUBLIC VAR Variable names may be preceded by PRIVATE or PUBLIC to restrict the search for them. Function descriptions may use IN INOUT OPTIONAL and OUT modes. Of special interest are EQUALS (x=expr) EQUALS_FIRST (x+=expr, etc.) POST_DEC (x--) POST_INC (x++) PRE_DEC (--x) and PRE_INC (++x) and subscripting (x[expr]) and mapping (MAP(x,expr)).