(j3.2006) Would there be a technical problem if...

Malcolm Cohen malcolm
Wed Jan 17 21:05:49 EST 2018


>I don't do much C, and haven't done any recently. Isn't a 1-D array
>represented by a pointer to its first element?

 

No.

 

> I.e., you can't tell the
>difference between a scalar and a 1-D array?

 

Depends on context.

 

> Isn't an N-D array a
>pointer to an array of (N-1)-D array pointers?



No.  A brief perusal of Fortran 2003 C interoperability should dispel this illusion.

 

Cheers,

-- 

..............Malcolm Cohen, NAG Oxford/Tokyo.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.j3-fortran.org/pipermail/j3/attachments/20180118/ef5340e1/attachment-0001.html>



More information about the J3 mailing list