6.5. Widening {Widening transforms integers to real numbers, real numbers to complex numbers (in both cases, with the same size), a value of mode 'BITS' to an unpacked vector of truth values, or a value of mode 'BYTES' to an unpacked vector of characters.
For example, in z := 1, the yield of 1 is widened to the real number 1.0 and then to the complex number (1.0, 0.0); syntactically, the a priori mode specified by INT is changed to that specified by REAL and then to that specified by COMPL.}
6.5.1. Syntax A) BITS :: structured with row of boolean field SITHETY letter aleph mode.
B) BYTES :: structured with row of character field SITHETY letter aleph mode.
C) SITHETY :: LENGTH LENGTHETY ; SHORTH SHORTHETY ; EMPTY.
D) LENGTH :: letter l letter o letter n letter g.
E) SHORTH :: letter s letter h letter o letter r letter t.
F) LENGTHETY :: LENGTH LENGTHETY ; EMPTY.
G) SHORTHETY :: SHORTH SHORTHETY ; EMPTY.
a) widened to{b,61A } SIZETY real FORM : MEEK{61C } SIZETY integral FORM.
{SIZETY :: long LONGSETY ; short SHORTSETY ; EMPTY.}
b) widened to{61A } structured with SIZETY real field letter r letter e SIZETY real field letter i letter m mode FORM : MEEK{61C } SIZETY real FORM ; widened to{a} SIZETY real FORM.
c) widened to{61A } row of boolean FORM : MEEK{61C } BITS FORM.
d) widened to{61A } row of character FORM : MEEK{61C } BYTES FORM. {Examples:
}
6.5.2. Semantics The yield W of a widened-to-MODE-FORM F is determined as follows:
· let V be the yield of the direct descendent of F;
· W is the real number
widenable from {2.1.3.1.e
} V;
· W is {the complex number
which is} a structured value whose fields are respectively V and
the real number 0 of the same size {2.1.3.1.b
} as V;
· W is the {only} field
of V.
Next