Re: Easy question about Character manipulation



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;


.



Relevant Pages

  • Re: good c compiler
    ... for each of the integer types char, short, int, long and long ... FYI gcc is NOT the ISO standard for the C language. ... What use is a compiler ... that doesn't follow the ABI for its target platform? ...
    (comp.lang.c)
  • Re: CString or char*??
    ... >>> At my university we always wondered if the ISO had an ISO standard ... >>> for amount of hot air put into each ISO standard, ... >>> for the amount of times an ISO standard can include the word ... if you want to write a C++ compiler wihout a good grasp on this document, ...
    (microsoft.public.vc.language)
  • Re: Q re CTE - simple (I think)
    ... ISO Standard and assume that people can read it. ... since it makes the compiler a little easier to write. ... SQL Server is still decades behind other products im so many ways. ... of just admitting that you had forgotten to adjust your mindset to a ...
    (microsoft.public.sqlserver.programming)
  • Re: New compiler chokes on template class
    ... > about code not conforming to the ISO standard. ... > of compiling my old programs with the new compiler. ... > about a missing semi-colon in a template class and I don't see the error. ... You must use "typename" as required by the standard. ...
    (comp.lang.cpp)
  • Re: Are people abusing "var"?
    ... not using some mechanism like "var" eliminates ... This was one of the key insights in the original design of Pascal (which, despite superficial differences, is an important intellectual ancestor of C#): Let the compiler help you keep>track of what YOU think the data types and structures should be. ... So, if the reader has a problem to understand what is the real type of the object, i guess there is something very wrong either with the function, either with the reader. ...
    (microsoft.public.dotnet.languages.csharp)