[an error occurred while processing this directive]
Because there is such flexibility in the design of the window data type, the set of data types and operators in Scout may be extended in the future. There are, however, some essential data types in Scout: integer, point, window and display. Associated with them are basic operators for integer arithmetic, vector manipulation, list manipulations, construction and selection. The following shows the basic Scout operators and functions for the four essential data types. All the operators of the Scout notation can be found in the next section.
+
, -
, *,
/,
%
(remainder), -
(unary minus)+
, -
{10, 20} - {20, 5}
gives {-10, 15}
.1
, .2
{10, 20}.1
gives 10
{ type: DONALD, box: b, pict: "FIGURE1"}
{ type: DONALD, box: b, pict: "FIGURE1"}.box
gives b
< don1 / don2 >
insert(
L, pos, exp)
insert(<w1, w2, w3>, 2, new)
gives <w1, new, w2,
w3>
delete(
L, pos)
delete(<w1, w2, w3>, 2)
gives <w1, w3>
if
cond then
exp1 else
exp2
endifif
cond gives non-zero value (true) then returns
exp1 else
returns exp2, in this context, exp1
and exp2 must have the same type.
if 1 then "Open" else "Close" endif
gives "Open"