Contents | Prev
| Next |
Index
Assignment Compatibility
Assignment compatibility is necessary when a value is assigned to something,
such as in an assignment statement or
in passing value parameters. A value
of type T2 is assignment compatible with a type T1 (that is,
T1 := T2 is allowed) if any of the following are true:
-
T1 and T2 are identical
types and neither is a file type or a
structured type that contains a file type component at any level of
structuring.
-
T1 and T2 are
compatible
ordinal types, and the values of
T2 fall within the range of possible values of T1.
-
T1 and T2 are real types, and the value of T1 falls
within the range of possible values for T1.
-
T1 is a real type, and T2 is an integer type.
-
T1 and T2 are STRING
types.
-
T1 is a STRING type, and
T2 is a CHAR type.
-
T1 and T2 are
compatible
set types, and all the members of the value
of the type T2 fall withing the range of possible values of
T1.
-
T1 and T2 are
compatible
pointer types.
-
T1 is a class type, and
T2 is a class type derived from
T1.
-
T1 and T2 are
compatible
procedural types.
-
T1 is a procedural type,
and T2 is a an address of
a procedure or function with an identical
result type, and matching formal
parameter lists.
-
T1 is of Java type
java.lang.String,
and T2 is a STRING type.
-
T1 is a STRING type, and
T2 is of Java type
java.lang.String.
Contents | Prev
| Next |
Index
Canterbury Pascal for JVM (Last documentation update
Sep 02, 2004)
Copyright © 1999-2004 J.Neuhoff - mhccorp.com
. All rights reserved.
Please send any comments or corrections to
neuhoff@mhccorp.com