Category:ALGOL 68: Difference between revisions
→Coercion (casting): Reduced the width of the <div>
(Added TODO) |
(→Coercion (casting): Reduced the width of the <div>) |
||
Line 178:
<br>
Click "Expand" for more details.
<div class="mw-collapsible mw-collapsed" style="width:
<div class="mw-collapsible-content" style="padding-left:2em;">
Line 204:
g
||Right hand side of:
* Identity-declarations, as "~" in: <
* Initialisations, as "~" in: <
Also:
* Actual-parameters of calls, as "~" in:<
* Enclosed clauses of casts, as "~" in: <
* Units of routine-texts
* Statements yielding VOID
* All parts (but one) of a balanced clause
* One side of an identity relation, as "~" in: <
|bgcolor=aaaaff rowspan=4 width="50px"| deproc- eduring
|bgcolor=aaeeaa rowspan=3 width="50px"| all '''soft''' then weak deref- erencing
Line 220:
|colspan=1 bgcolor=ffcccc|
Widening occurs if there is no loss of precision. For example: An INT will be coerced to a REAL, and a REAL will be coerced to a LONG REAL. But not vice-versa. Examples:
<
INT to REAL
REAL to COMPL
BITS to []BOOL
BYTES to STRING</
A variable can also be coerced (rowed) to an array of length 1.
For example:
<
REAL to [1]REAL</
|-
!F<br>
Line 236:
m
||
*Operands of formulas as "~" in:<
*Parameters of transput calls
|colspan=3 bgcolor=ffcc99| Example:
<
|-
!M<br>
Line 248:
* Trimscripts (yielding INT)
* Enquiries: e.g. as "~" in the following
<
<
* Primaries of calls (e.g. sin in sin(x))
|colspan=4 bgcolor=ffee99|Examples:
<
REF REF REF INT to INT</
|-
!W<br>
Line 260:
k
||
* Primaries of slices, as in "~" in: <
* Secondaries of selections, as "~" in: <
|colspan=5 bgcolor=aaeeaa|Examples:
<
REF REF INT to REF INT
REF REF REF REAL to REF REAL
REF REF REF REF STRUCT to REF STRUCT</
|-
!S<br>
Line 272:
f<br>
t
|| The LHS of assignments, as "~" in: <
|colspan=6 bgcolor=aaaaff| Example:
* deproceduring of: <
|}
For more details about Primaries and Secondaries refer to [[Operator_precedence#ALGOL_68|Operator precedence]].
|