[fpc-pascal] Illogical automatic dereferencing

Henry Vermaak henry.vermaak at gmail.com
Sat Oct 10 20:19:01 CEST 2009


2009/10/10 "Vinzent Höfler" <JeLlyFish.software at gmx.net>:
> Henry Vermaak <henry.vermaak at gmail.com>:
>
>> One thing I think you don't understand is that an array _is_ a
>> pointer.  Look at this table to visualise:
>>
>> http://en.wikipedia.org/wiki/C_syntax#Accessing_elements
>
> One thing I think you don't understand is that arrays and pointers are orthogonal concepts in almost every
> other programming language than C.

Yes, I am aware of this (at least with the languages I've worked with).

>
> So technically, C is the one who got it wrong.

Huh?  Are you saying something is wrong because the majority does it
differently?

>
> Same for "Array subscript numbering begins at 0." - which simply isn't true for Pascal.

Except when you define an array[0..9], for instance, or for dynamic
arrays.  I can think of only strings that always start with [1], but
I'm often mistaken :)

Henry



More information about the fpc-pascal mailing list