Re: Easy question about Character manipulation



"(see below)" <yaldnif.w@xxxxxxxxxxxxxxxx> writes:

On 30/1/07 01:43, in article 1170121405.6329.89.camel@localhost, "Georg
Bauhaus" <bauhaus@xxxxxxxx> wrote:

On the contrary, this *exactly* like (ISO Standard) Pascal.

I don't think so, if a Pascal compiler is supposed
to determine "the same type" (exact same type) by looking
at the definition, not the name. Otherwise two compilers
claiming to support ISO Pascal are broken:

Trust me, I was one of the team that wrote the standard. 8-)

OK. ;-)

T = 1 .. 3;
S = 1 .. 3;

This is not a matter of type equivalence,
it is a matter of automatic type conversion on assignment
(assignment compatibility), and that IS unlike Ada, of course.

What about parameter passing? I was under the impression that one can
pass something of type T to a parameter of type S, or a parameter of
type Integer, or vice versa, in Pascal. Please correct me if I'm
wrong.

If I'm right on that point, then I claim that we're just arguing over
terminology: saying "so-and-so are different types, but there are all
kinds of implicit conversions" amounts to roughly the same thing as
"so-and-so are the same type".

The point is, if you say this in Ada:

type T1 is range 1..10;
type T2 is range 1..10;
X : T1;
Y : T2;

is there any equivalent in Pascal that causes "X := Y" to be illegal
(or similarly for parameter passing)?

- Bob
.