Re: Easy question about Character manipulation
- From: Georg Bauhaus <bauhaus@xxxxxxxx>
- Date: Tue, 30 Jan 2007 02:43:26 +0100
On Tue, 2007-01-30 at 00:51 +0000, (see below) wrote:
On 29/1/07 21:30, in article 1170106218.6329.63.camel@localhost, "Georg
Bauhaus" <bauhaus@xxxxxxxx> wrote:
Unlike Pascal, for example, types in Ada are different when
they have different names.
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:
program p;
type
T = 1 .. 3;
S = 1 .. 3;
var
x : T;
y : S;
begin
x := y; { fine in Pascal }
end.
This program seems to be Standard Pascal, and compiles.
The corresponding Ada program will not compile:
procedure p is
type T is range 1 .. 3;
type S is range 1 .. 3;
x : T;
y : S
begin
x := y; -- not the same type, compilation error
end;
.
- Follow-Ups:
- Re: Easy question about Character manipulation
- From: (see below)
- Re: Easy question about Character manipulation
- References:
- Easy question about Character manipulation
- From: mark
- Re: Easy question about Character manipulation
- From: Dmitry A. Kazakov
- Re: Easy question about Character manipulation
- From: Georg Bauhaus
- Re: Easy question about Character manipulation
- From: (see below)
- Easy question about Character manipulation
- Prev by Date: Re: Easy question about Character manipulation
- Next by Date: Re: Easy question about Character manipulation
- Previous by thread: Re: Easy question about Character manipulation
- Next by thread: Re: Easy question about Character manipulation
- Index(es):
Relevant Pages
|