Documentation:Reference:TDI B1 - MdsWiki
Navigation
Personal tools

From MdsWiki

Jump to: navigation, search

backspace (UNIT)

IO. Backspaces one record. ??

BEGIN_OF (A,[N])

MDS Operation. Get the begin field.

Arguments Optional: N.
A as below.
N integer scalar, for slopes from 1 to the number of
segments less one. The first segment has no beginning
if the axis is infinite.

Result.. A is searched for these:
DSC$K_DTYPE_RANGE, the begin field (may be an array).
DSC$K_DTYPE_SLOPE, N-th segment's begin field !deprecated!.
DSC$K_DTYPE_WINDOW, the startidx field.
Otherwise, an error.

Example. BEGIN_OF(1..10) is 1.

BIT_SIZE (I)

F90 Inquiry. The length of integer or other type (extension) in bits.

Argument. I is any type, scalar or array.

Signals. None.
Units... None.
Form.... Integer scalar.

Result.. The number of bits in I if it is scalar or in
an element of I if it is an array.

Example. BIT_SIZE(1) is 32.

BREAK;

CC Statement. Break from FOR or WHILE loops or SWITCH.
Usual Form BREAK;
Function Form BREAK(). May be syntatically invalid.

Arguments None.

Result.. None.

Example. FOR (_J=DSIZE(_X); --J>=0; ) IF (_X[_J]) BREAK;
IF (_J < 0) ABORT();
is a lousy way to do IF (!ALL(_X)) ABORT();.

BSEARCH (X,TABLE,[MODE])

Numeric and Character Elemental. Binary search in a sorted table.

Arguments Optional: MODE.
X integer, real, or text, scalar or array. No complex.
TABLE ascending-sorted, scalar or array. Should be integer,
real, or text.
MODE integer scalar, default is 0.

Signals. Same as X.
Units... None.
Form.... Integer offset in table of match.
Result.. The offset in TABLE whose value matches X.
For each list element k and matching table element j:
(1) MODE=0, TABLE[j] == X[k] with result range 0 to n-1,
where n is the number of elements in TABLE
or -1 if no exactly matching element number.
(2) MODE=+1, TABLE[j] <= X[k] < TABLE[j+1]
with result range -1 to n.
(3) MODE=-1, TABLE[j-1] < X[k] < TABLE[j]
with result range 0 to n+1.
Effectively, TABLE[-1] is negative infinity and TABLE[n]
is positive infinity.

Examples. BSEARCH(3,1:10) is 2.
BSEARCH(1..8,3..5) is [-1,-1,0,1,2,-1,-1,-1].
MAP(1:10,BSEARCH(3.9,1:10,1)) is 3.

See also. SORT and SORTI for data and index sorting.
MAP to pick the selected elements.

BTEST (I,POS)

F90 Bit-wise Elemental. Test a bit of a number.

Arguments
I any. F90 requires integer.
POS integer offset within the element of I. Must be
nonnegative and less than BIT_SIZE(I).

Signals. Same as I.
Units... Same as I.
Form.... Logical of compatible shape.

Result.. True if POS is proper and the element is 1;
otherwise, false.

Examples. BTEST(8,3) is $TRUE. if _A = Set_range(2,2,[1,3,2,4])
BTEST(_A,2) is
Set_Range(2,2,[$FALSE,$FALSE,$FALSE,$TRUE]).
BTEST(2,_A) is
Set_Range(2,2,[$TRUE,$FALSE,$FALSE,$FALSE]).

See also. IBCLR to clear, BITS to extract, and IBSET to set.

BUILD_ACTION (DISPATCH,TASK,[ERRORLOGS],[COMPLETION],[PERFORMANCE])

MDS Operation. Make an action descriptor.

Arguments
DISPATCH dispatch descriptor.
TASK procedure, program, routine, or method descriptor.
ERRORLOGS a character scalar for error reports.
COMPLETION notification list.
PERFORMANCE unsigned long vector of statistics from execution.

Result.. Class-R descriptor.
Use BUILD_xxx for immediate structure building.
Use MAKE_xxx in FUNs for evaluated non-PUBLIC variables.

Example. BUILD_ACTION(BUILD_DISPATCH("ident","phase","when",
"completion"),BUILD_ROUTINE(timeout,image,routine))
has only dispatch and task.

BUILD_CALL ([KIND],IMAGE,ROUTINE,[ARG],...)

MDS Operation. Make a call of a routine in a sharable image.
Usual Forms IMAGE->ROUTINE:KIND([ARG],...) or IMAGE->ROUTINE([ARG])

Arguments Optional: KIND, ARG... .
KIND byte unsigned scalar of KIND returned in R0.
Use DSC$K_DTYPE_DSC=24 for a pointer to an XD.
Use DSC$K_DTYPE_MISSING=0 for no information.
Default type is long integer.
Other accepted types are BU WU LU QU OU B W L Q O F D
NID and null-terminated strings T PATH EVENT.
IMAGE character scalar. It must be a simple filename in
SYS$SHARE or a logical name of the file.
ROUTINE character scalar.
ARG... arguments with certain options.

Result.. Class-R descriptor.
Use BUILD_xxx for immediate structure building.
Use MAKE_xxx in FUNs for evaluated non-PUBLIC variables.
Use this form if IMAGE or ROUTINE must be expressions.

Example. BUILD_CALL(24,'TDISHR','TDI$SIND',DESCR(30.)) is
the slow and hard way to do SIND(30.).

See also. CALL for info on argument form and type of output.

BUILD_CONDITION (MODIFIER,CONDITION)

MDS Operation. Make a condition descriptor.

Arguments
MODIFIER word unsigned, evaluated:
TREE$K_NEGATE_CONDITION 7
TREE$K_IGNORE_UNDEFINED 8
TREE$K_IGNORE_STATUS 9
CONDITION MDS event or path.

Result.. Class-R descriptor.
Use BUILD_xxx for immediate structure building.
Use MAKE_xxx in FUNs for evaluated non-PUBLIC variables.

Example. None, normally done by COMPILE_DEPENDENCY.

See also. BUILD_DEPENDENCY BUILD_EVENT and COMPILE_DEPENDENCY.

BUILD_CONGLOM (IMAGE,MODEL,NAME,QUALIFIERS)

MDS Operation. Make a conglomerate descriptor.

Arguments
IMAGE character scalar.
MODEL character scalar.
NAME character scalar.
QUALIFIERS long vector, module dependent.

Result.. Class-R descriptor.
Use BUILD_xxx for immediate structure building.
Use MAKE_xxx in FUNs for evaluated non-PUBLIC variables.

Example. None, normally done by module add routines.

BUILD_DEPENDENCY (OP_CODE,ARG_1,ARG_2)

MDS Operation. Make a dependency descriptor.

Arguments
OP_CODE word unsigned scalar, evaluated.
TREE$K_DEPENDENCY_AND 10
TREE$K_DEPENDENCY_OR 11
ARG_1 MDS condition, event, or path.
ARG_2 MDS condition, event, or path.

Result.. Class-R descriptor.
Use BUILD_xxx for immediate structure building.
Use MAKE_xxx in FUNs for evaluated non-PUBLIC variables.
Example. None, normally done by COMPILE_DEPENDENCY.

See also. BUILD_CONDITION BUILD_EVENT and COMPILE_DEPENDENCY.

BUILD_DIM ([WINDOW],AXIS)

MDS Operation. Make a dimension descriptor.

Arguments Optional: WINDOW.
WINDOW window descriptor.
If missing, all point of AXIS are included and
the initial point of the axis has an index of 0.
AXIS slope or, if defined, other descriptor type.

Signals. None.
Units... From AXIS. Should be same as WINDOW's value_at_idx0.
Result.. Class-R descriptor.
Use BUILD_xxx for immediate structure building.
Use MAKE_xxx in FUNs for evaluated non-PUBLIC variables.
The array will have bounds only if the
window has a defined value at index 0.

Example. BUILD_DIM(BUILD_WINDOW(-1,3,10.),BUILD_SLOPE(3.))
makes dimension with value
SET_RANGE(-1..3, [7.,10.,13.,16.,19.]).

BUILD_DISPATCH (TYPE,IDENT,PHASE,WHEN,COMPLETION)

MDS Operation. Make a dispatch descriptor.

Arguments
TYPE byte unsigned scalar, evaluated:
TREE$K_SCHED_ASYNC 1
TREE$K_SCHED_SEQ 2
TREE$K_SCHED_COND 3
IDENT character scalar.
PHASE character scalar.
WHEN character scalar?
COMPLETION character scalar?

Result.. Class-R descriptor.
Use BUILD_xxx for immediate structure building.
Use MAKE_xxx in FUNs for evaluated non-PUBLIC variables.

Example. None, normally done by module add routine.

BUILD_EVENT (STRING)

MDS Operation. Make an event descriptor.

Argument. STRING must be a character scalar expression.

Result.. Class-S, data type-EVENT descriptor.
Immediate at compilation.

Example. BUILD_EVENT('SHOT_DONE') makes an event for use in other
descriptors.

See also. BUILD_CONDITION BUILD_DEPENDENCY and COMPILE_DEPENDENCY.

BUILD_FUNCTION (OPCODE,[ARG],...)

MDS Operation. Make a function descriptor.

Arguments Optional: ARG,... .
OPCODE unsigned word from 0 to the number defined less one.
ARG,... as needed by the function described by OPCODE.

Result.. Class-R descriptor.
Use BUILD_xxx for immediate structure building.
Use MAKE_xxx in FUNs for evaluated non-PUBLIC variables.
Example. BUILD_FUNCTION(BUILTIN_OPCODE('SIN'),30) makes an
expression SIN(30).