Documentation:Reference:TDI NO - MdsWiki
Navigation
Personal tools

From MdsWiki

Jump to: navigation, search

NAME_OF (A)

MDS Operation. Get the name field.

Argument. Descriptor as below.

Result.. A is searched for this:
DSC$K_DTYPE_CONGLOM, the name field.
Otherwise, an error.

NAND (L,M)

Logical Elemental. Negation of logical intersection of elements.
Usual Forms L NAND M.

Arguments L and M must be logical (lowest bit is 1 for true).

Signals. Single signal or smaller data.
Units... None unless both have units and they don't match.
Form.... Logical of compatible shape.

Result.. False if both are true; otherwise, true.

Example. [0,0,1,1] && [0,1,0,1] is [$TRUE,$TRUE,$TRUE,$FALSE].

NAND_NOT (L,M)

Logical Elemental. Negation of logical intersection of first with
negation of second. Logically equivalent to NOT(L) OR M.
Accepted Form. L NAND_NOT M.

Arguments L and M must be logical (lowest bit is 1 for true).

Signals. Single signal or smaller data.
Units... None unless both have units and they don't match.
Form.... Logical of compatible shape.

Result.. True if L is false or M is true; otherwise, false.
Example. [0,0,1,1] NAND_NOT [0,1,0,1] is
[$TRUE,$TRUE,$FALSE,$TRUE].

NDESC (A)

MDS Information. The number of descriptors in an MDS record.

Argument. A must be an MDS class-R descriptor.

Signals. None.
Units... None.
Form.... Byte unsigned scalar.
Result.. The number of descriptors in the class-R descriptor.
Descriptor data types (DSC$K_DTYPE_DSC) are removed.
Use NDESC for count without NID, PATH, or variable.
Use NDESC_OF for count including them.

Examples. NDESC($VALUE) is 0. NDESC(A+B) may be error.

NDESC_OF (A)

MDS Information. The number of descriptors in an MDS record.

Argument. A must be an MDS class-R descriptor.

Signals. None.
Units... None.
Form.... Byte unsigned scalar.

Result.. The number of descriptors in the class-R descriptor.
Descriptor data types (DSC$K_DTYPE_DSC) are removed.
Use NDESC for count without NID, PATH, or variable.
Use NDESC_OF for count including them.

Examples. NDESC_OF($VALUE) is 0. NDESC_OF(A+B) is 2.

NDIMS (A)

MDS Information. The number of dimensions in an array or signal.

Argument. A can be a scalar, array or signal.

Result.. The number of dimensions in an array or signal.
If A is a scalar, NDIMS returns 0.
If A is an array or signal, NDIMS returns the number of dimensions.

Examples. NDIMS(42) is 0. NDIMS(ZERO([3,3],0)) is 2. NDIMS(BUILD_SIGNAL(1,*,3,4,5)) is 3.

NE (X,Y)

Logical Elemental. Tests for inequality of two values.
Usual Forms X != Y, X <> Y, X NE Y. F90 form /= is not allowed.
Function Form NE(X,Y).

Arguments X and Y must both be numeric or character.

Signals. Single signal or smaller data.
Units... None unless both have units and they don't match.
Form.... Logical of compatible shape.

Result.. True if X and Y are the unequal; otherwise, false.
$ROPRAND is not unequal to any value, thus gives false.
>>>>>>>>>WARNING, floating point operations may not match an exact
calculation for nonterminating binary fractions.
You cannot predict that .1+.1!=.2 will be false.

Example. 2<>2. is $FALSE.

nearest (X,S)

F90 Numeric Elemental. Nearest different machine represntable number in
a given direction.

Arguments
X real.
S real and not zero.

Signals. Single signal or smaller data.
Units... Same as X.
Form.... Same as X.

Result.. The machine representable number distinct from X and
nearest to it in the direction to the infinity of the
same sign as S.

Example. NEAREST(3.0,2.0) is 3+2^(-22).

NEQV (L,M)

Logical Elemental. Test that logical values are unequal.

Arguments L and M must be logical (lowest bit is 1 for true).

Signals. Single signal or smaller data.
Units... None unless both have units and they don't match.
Form.... Logical of compatible shape.
Result.. True if exactly one of X and Y are true;
otherwise, false.

Example. 2>3 NEQV 3>4 is $FALSE.

NINT (A,[KIND])

F90 Numeric Elemental. Nearest integer.

Argument. Optional: KIND.
A real. Complex numbers are an error.
Integers are passed.
KIND scalar integer type number, for example, KIND(1).
(Today. Ignored, always returns LONG.)

Signals. Same as A.
Units... Same as A.
Form.... Integer.

Result.. If A>0, NINT(A) is INT(A+0.5); else it is INT(A-0.5).

Examples. NINT(2.783) is 3. NINT(-2.783) is -3.

NOR (L,M)

Logical Elemental. Negation of logical union of elements.
Usual Forms L NOR M.

Arguments L and M must be logical (lowest bit is 1 for true).

Signals. Single signal or smaller data.
Units... None unless both have units and they don't match.
Form.... Logical of compatible shape.

Result.. False if either is true; otherwise, true.

Example. [0,0,1,1] && [0,1,0,1] is [$TRUE,$FALSE,$FALSE,$FALSE].

NOR_NOT (L,M)

Logical Elemental. Negation of logical union of first with negation
of second. Logically equivalent to NOT(L) AND M.
Accepted Form. L NOR_NOT M.

Arguments L and M must be logical (lowest bit is 1 for true).

Signals. Single signal or smaller data.
Units... None unless both have units and they don't match.
Form.... Logical of compatible shape.

Result.. True if L is false and M is true; otherwise, false.

Example. [0,0,1,1] NOR_NOT [0,1,0,1] is
[$FALSE,$TRUE,$FALSE,$FALSE].

NOT (L)

Logical Elemental. Negate a logical. True is 1BU, False is 0BU.
Usual Form ! L or NOT L.
Function Form NOT(L).

Argument. L must be logical.

Signals. Same as L.
Units... Same as L.
Form.... Logical.

Result.. True if lowest bit of converted integer is off.
>>>>>>>>>WARNING, do not confuse this with the bit-wise INOT(J).
What F90 calls NOT, we call INOT.

Example. NOT([1,2,3]) is [$FALSE,$TRUE,$FALSE]).

OBJECT_OF (A)

MDS Operation. Get the object field.

Argument. Descriptor as below.

Result.. A is searched for this:
DSC$K_DTYPE_METHOD, the object field.
Otherwise, an error.

OCTAWORD (A)

Conversion Elemental. Convert to octaword (16-byte) integer.

Argument. A must be numeric.

Signals. Same as A.
Units... Same as A.
Form.... Octaword-length integer.

Result.. The truncated whole part of A.
Immediate at compilation.
>>>>>>>>>WARNING, truncation does not cause an error.

Examples. OCTAWORD(123) is 123O. OCTAWORD(65537) is 65537O.

OCTAWORD_UNSIGNED (A)

Conversion Elemental. Convert to octaword (16-byte) unsigned integer.

Argument. A must be numeric.

Signals. Same as A.
Units... Same as A.
Form.... Octaword-length unsigned integer.

Result.. The truncated whole part of A.
Immediate at compilation.
>>>>>>>>>WARNING, truncation does not cause an error.
Example. OCTAWORD_UNSIGNED(123) is 123oU.

on_error ([A])

Miscellaneous. On an error do the action A.

Argument. Optional: A.
A may be any expression. The default is to cancel previous
setting.

Result.. The result of action A.
Example. ?? if ever.

OPCODE_BUILTIN (I)

MDS Information. The string name of a builtin's opcode.

Argument. I must be an unsigned word scalar. It must be from 0 to
the number of defined opcodes less one.

Signals. Same as I.
Units... Same as I.
Form.... Character scalar of same shape.
Result.. The uppercase name for the opcode.

Example. OPCODE_BUILTIN(0) is "$".

OPCODE_STRING (I)

MDS Information. The string name of an opcode.

Argument. I must be an unsigned word scalar. It must be from 0 to
the number of defined opcodes less one.

Signals. Same as I.
Units... Same as I.
Form.... Character scalar of same shape.

Result.. The uppercase name for the opcode.

Example. OPCODE_STRING(0) is "OPC$$".

OR (L,M)

Logical Elemental. Logical union of elements.
Usual Forms L || M, L OR M.
Function Form OR(L,M).

Arguments L and M must be logical (lowest bit is 1 for true).

Signals. Single signal or smaller data.
Units... None unless both have units and they don't match.
Form.... Logical of compatible shape.

Result.. True if either is true; otherwise, false.
>>>>>>>>>WARNING, do not confuse with | which is bit-wise IOR.

Example. [0,0,1,1] || [0,1,0,1] is [$FALSE,$TRUE,$TRUE,$TRUE].

OR_NOT (L,M)

Logical Elemental. Logical union of first with negation of second.
Accepted Form. L OR_NOT M.

Arguments L and M must be logical (lowest bit is 1 for true).

Signals. Single signal or smaller data.
Units... None unless both have units and they don't match.
Form.... Logical of compatible shape.

Result.. True if L is true or M is false; otherwise, false.

Example. [0,0,1,1] OR_NOT [0,1,0,1] is [$TRUE,$FALSE,$TRUE,$TRUE].