Documentation:Reference:TDI D1 - MdsWiki
Navigation
Personal tools

From MdsWiki

Jump to: navigation, search

DATA (X)

MDS Operation. Removes signal and parameter descriptors and evaluates
ranges and tries to give a VMS data type.

Argument. X may be any data type with a data/value field.

Signals. None.
Units... None unless X is AS_IS.
Form.... VMS scalar or array.

Result.. For a dimension, the axis values.
For a signal or with_units, the evaluated data field.
For a param, the evaluated value field.
For a range, the values.
For VMS data, no change is made.
Immediate at compilation.

Example. DATA(BUILD_SIGNAL(42.*$VALUE,6)) is 252.

DATA_WITH_UNITS (X)

MDS Operation. Removes signal and parameter descriptors and evaluates
ranges and tries to give a VMS data type bound in a
with_units descriptor.

Argument. X may be any data type with a data/value field.

Signals. None.
Units... Same as X.
Form.... With_units descriptor with a VMS scalar or array data
field. The units pointer may be null or point to a
standard units data (today, text).

Result.. For a dimension, the axis values.
For a signal or with_units, the evaluated data field.
For a param, the evaluated value field.
For a range, the values.
For VMS data, no change is made.
The result has a data field and if there are units the
units descriptor with the first units found.
Immediate at compilation.

Example. DATA_WITH_UNITS(BUILD_SIGNAL(42.*$VALUE,
BUILD_WITH_UNITS(6,'count'//'s')) is
Build_With_Units(252,'counts').

date_and_time ([STRING])

F90 Modified IO. Integer data from the date available to the processor
and a real-time clock.

Argument. STRING is character name of option. Options are
DATE (9 characters)
TIME (10 characters)
ZONE (5 characters) or
VALUES (8 integers) the default.

Signals. Same as STRING.
Units... None, bad if STRING has units.
Form.... Character string or integer vector.

Result.. If data is unavailable -HUGE(0), else:
VALUES(0) Gregorian year, e.g., 1990
VALUES(1) month 1 to 12
VALUES(2) day of month 1 to 31
VALUES(3) minutes local time is in advance of UTC
VALUES(4) hour of day 0 to 23
VALUES(5) minute of hour 0 to 59
VALUES(6) second of minute 0 to 59
VALUES(7) milliseconds 0 to 999

Example. If called in Geneva, Switzerland on 1985 April 12 at
15:27:35.5 would return 19850412 for 'DATE'
152735.500 for 'TIME', +0100 for 'ZONE' and
[1985,4,12,60,15,27,35,500] for the default.

DATE_TIME ([TIME])

VMS IO. The current/specified data and time as a text string.

Arguments Optional TIME must be a quadword (64-bit) positive
absolute time or negative delta time.

Signals. None.
Units... None.
Form.... Character scalar of length 23.

Result.. The current date and time.

Example. DATE_TIME() might be 26-JAN-1990 15:15:19.54.

DBLE (A)

F90 Modified Conversion Elemental. Double the precision of a number.

Argument. A must be numeric and must not be octaword or H floating
because they are maximum precision.

Signals. Same as A.
Units... Same as A.
Form.... Twice the precision of the argument. Byte becomes word,
word becomes long, long becomes quadword, quadword
becomes octaword, F floating becomes D, D or G floating
becomes H. Unsigned, signed, real, and complex types
remain so.
>>>>>>WARNING F90 always converts to a double-precision real--D_FLOAT.

Examples. DBLE(3) is 3Q. DBLE(3.0) is 3D0.

DEALLOCATE ([STRING],...)

Variables. Release variables by wildcarded name or release all
private variables.

Arguments Optional: STRING....
STRING,... character scalars. Wildcards % and * are allowed.
If STRING is absent, all private variables are released.
Result.. None.

Side Effect. The variable is no longer allocated.

Example. DEALLOCATE("_A*") removes all starting with _A.

DEBUG (OPTION)

Compile Operation. Controls debugging output.

Argument. OPTION is integer scalar.
OPTION = 1, "prepends" the first error message text.
OPTION = 2, prints the error message.
OPTION = 4, clears the error message and status.
OPTION is the bitwise combination of these codes.

Signals. None.
Units... None.
Form.... Character string scalar.

Result.. Previous value of debugging messages.
An empty string is returned if no error was detected.

Example. DEBUG(7) appends the first detected error's text,
prints the message, and frees the message string.
DEBUG(5) can fetch and clear the error string.

decode (FMT|*,STRING)

Miscellaneous. ??

DECOMPILE (X,[MAX])

Compile Operation. Converts the argument expression to text that will
compile to the same expression.

Arguments Optional: MAX.
X any MDS or VMS data description.
MAX Integer scalar for the maximum number of vector elements
to display. Default is all.

Signals. None.
Units... None.
Form.... Character scalar. Length limit is 65535.

Result.. The text, less comments, that could make the argument.

Example. DECOMPILE('_A+\TOP.XRAY.CHAN01:DATA/*my expression*/')
is _A + \TOP.XRAY.CHAN01:DATA. Some forms are converted
to the most common one: 'CONCAT(_B,"X")' will be
_B // "X". Control characters, double quotes, and
backslashes (\) are converted to their backslash form.

Information on decompiling an action in a tree node.

DECOMPILE_DEPENDENCY (X)

Compile Operation. Converts the dependency expression to text that will compile to the same expression.

Argument. X must be from the restricted class of MDS descriptors:
node identifiers, pathnames, events, dependencies, and
conditions.
Immediate at compilation.

Result.. Character scalar.

See also. COMPILE_DEPENDENCY to create the expression.

DECOMPRESS (IMAGE,ROUTINE,SHAPE,DATA)

Miscellaneous. Expand compressed data into original form.

Arguments Optional: IMAGE, ROUTINE.
IMAGE character scalar of SYS$SHARE:.EXE file or logical name.
Default is MDSSHR if no ROUTINE.
ROUTINE character scalar of entry point name in shared image.
Default is MDS$DECOMPRESS
SHAPE Expanded form data shape.
DATA A vector of any type that has the compressed data.

Signals. None.
Units... None.
Form.... Original form, usually.

Result.. The original data. This is done automatically when
compressed, CLASS_CA, data is fetched from the tree.

Example. DECOMPRESS(,,BUILD_ARRAY(10),
[0x00880246, 0x84620800LU, 0x4befcb4e, 0x080a])
gives [0,164,228,252,256,250,238,224,207,190].
(Actually this does not save enough space so the
compression would not take place.)

==DEFAULT (STMT,...)

CC Statement.
Required Usual Form. CASE DEFAULT STMT.
Function Form DEFAULT(STMT,...). May be syntatically invalid.
Argument. STMT must be a statement, simple or compound
(like {S1 S2}) or multiple (like S1 S2).
>>>>>>WARNING, only one CASE DEFAULT should appear in a SWITCH.

Result.. None.

Example. SWITCH (_k) {
CASE (1) _j=_THING1; BREAK;
CASE (4.5:5.5) _j=_OTHER_THING; BREAK;
CASE DEFAULT ABORT();
}.

derivative (ARRAY,[DIM],[WIDTH])

Transformation. The slope along a dimension with optional smoothing. ??

Arguments Optional: DIM, WIDTH.
ARRAY numeric array. Signal uses dimension.
DIM integer scalar from 0 to n-1, where n is rank of ARRAY.
WIDTH real scalar.

Signals. Same as ARRAY.
Units... Same as for ARRAY/DIM_OF(ARRAY,DIM). (Today, ARRAY's.)
Form.... Same as ARRAY.

Result.. ??

DIAGONAL (ARRAY,[FILL])

Transformation. Create a diagonal matrix from its diagonal.

Arguments Optional: FILL.
ARRAY numeric or character vector.
FILL scalar converted to type of ARRAY. Default is numeric 0
or character blanks.

Signals. Same as ARRAY.
Units... Same as ARRAY.
Form.... Rank-two of shape [n,n], where n is the size of ARRAY.

Result.. Element [j,j] is ARRAY[j], for j from 0 to n-1.
All other elements are FILL.

Example. DIAGONAL([1,2,3]) is [1 0 0].
[0 2 0]
[0 0 3]

DICT ([DICT],KEY1,VAL1[,KEY2,VAL2,...])

Data type. Create a DTYPE_DICT data item which can be used as a dictionary similar to the use of dict objects in python.

Arguments Optional: DICT.
DICT an existing dictionary which the key value pairs will be appended to.
KEY1 usually a TEXT item or integer use to find values in the dictionay
VAL1 value associated with KEY1 of any datatype .
Result.. Dictionary similar to python {key1:val1,key2:val2,...}

Example. _D=DICT(*,'ONE',1,'TWO',2)['TWO'] is 2

To append: _D=DICT(_D,'THREE',3)