[Aldor-l] Compiling setup

Ralf Hemmecke ralf at hemmecke.de
Sat Aug 12 16:26:55 EDT 2006


> | If the compiler sees something like
> | 
> |    "blah"
> | 
> | in general it is even impossible to guess the type of that thing.

> To my eyes, that is a literal string.

That seems to be true, but what does "literal string" actually mean?

It is definitely not something of the libaldor type String (my base 
library might be something else where String does not even exist). And 
as you saw from the program I gave, it could mean the Integer 4.

I guess the Aldor type Literal is probably the closest we can get.

> |  >   char * litA = "abcdefghij";

> Why would  the C code not right?

>    char *litA = "abcdefghij";
>    char strA[] = "abcdefghij";

> litA points to a storage where resides string literal.  strA is an
> array whose elementss  can be freely modified.

Sorry, my knowledge of C is mainly non-existing.

> All major programming languages I know of that provide a modifiable
> string type behave correctly when a string is initialized with a literal.

I think the libaldor type String ought to do that. But as I said, I 
actually don't consider String as part of the Aldor language.

Ralf



More information about the Aldor-l mailing list