Re: Easy question about Character manipulation



(see below) wrote:

It depends on whether they are value parameters or var (-iable) parameters.
Value parameters are in effect assigned their values,
and the permissive semantics of assignment compatibility apply;
var parameters must be of equivalent types, and type-equivalence in
ISO Pascal is name-equivalence.

When I learned Pascal (not ISO), my understanding was that

type
A = 1 .. 3;

was called a subrange, and defined A as what Ada calls a subtype of Integer. Since

B = 1 .. 3;

was another subtype of the same type (in Ada terms), assignment between them was no problem.

--
Jeff Carter
"Alms for an ex-leper!"
Monty Python's Life of Brian
75
.



Relevant Pages

  • Re: Easy question about Character manipulation
    ... was called a subrange, and defined A as what Ada calls a subtype of ... was another subtype of the same type (in Ada terms), ... And, of course, there is more to type than assignment. ...
    (comp.lang.ada)
  • Re: Defined ranges
    ... assignment, I get this error message. ... allowed as primaries. ... denoting a type or subtype. ...
    (comp.lang.vhdl)
  • Re: Padding strings
    ... it's all a bit magical but the aggregate can work out its ... subtype from the other side of the assignment. ... DOULOS - Developing Design Know-how ...
    (comp.lang.vhdl)
  • Re: Defined ranges
    ... assignment, ... allowed as primaries. ... denoting a type or subtype. ... The Modelsim 6.0a compiler accepts the following without error: ...
    (comp.lang.vhdl)
  • Re: types and subtypes
    ... A subtype is not a type; no constraint is added to the type; the ... when an assignment to a variable of a ... problems as all values involved are of type Integer. ... Hope this helps in understanding ...
    (comp.lang.ada)