Anonymous user
Category:ALGOL 68: Difference between revisions
m
→Coercion (casting): fix typos.
(coercion) |
m (→Coercion (casting): fix typos.) |
||
Line 29:
not too much else is required.
== Coercion (casting) ==
ALGOL 68 has a hierarchy of
coercions are available at a particular point in the program. These contexts are:
* soft - deproceduring
* weak - dereferencing or deproceduring, yielding a name
Line 36 ⟶ 37:
* strong - firm, followed by widening, rowing or voiding
Depending on the context
of precision. For example: An INT will be coerced to a REAL, and a REAL will be
coerced to a LONG REAL. But not visa-versa. Examples:
* INT to REAL
* REAL to COMPL
* BITS to []BOOL
* BYTES to STRING
* INT to [1]INT
* REAL to [1]REAL etc
Pointers are followed (dereferenced), For example:
* REF REF REAL to REAL
|