Eike Lange wrote:
Am Die, 08 Aug 2000 schrieb Khimenko Victor:
Ahh. So it's array, not just pointer. In this case something like type mysqlrowa=array[0..100] of CString; mysqlrow=^mysqlrowa; will do. And you can use row^[0], row^[1], ... , row^[100] (there are no limit in C but in Pascal you NEED some limit - otherwise compiler will complain).
Ok, thats not exactely what I want to do. What about row[10000]? But if there is no direct equivalence, I try out some other ideas.
Victor is right: This is the direct equivalent.
In C, every pointer can be used as a pointer to an array of the target type, and the identifier of every array (without the []) represents the address of the array, not the array itself.
In this sense, there are either no real arrays in C, or there are no real pointers, only pointers to arrays. ;-)
Concerning enumerated types, GNU Pascal uses the same backend as GNU C does. If there is no striking reason to change this one day, I'd vote for fixing this as a feature of compatibility to GNU C.
Peter