TIP: Click on subject to list as thread! ANSI
echo: cis.tandy.coco
to: Jeff Dege 76426,211 (X)
from: Pete Lyall 76703,4230
date: 1990-05-05 13:17:22
subject: #3270-#C arrays

#: 3289 S10/Tandy CoCo
    05-May-90  13:17:22
Sb: #3270-#C arrays
Fm: Pete Lyall 76703,4230
To: Jeff Dege 76426,211 (X)

I'm leaving town a bit later today, but if I wasn't, I'd make an attempt to
rebut that.... int foo[6] creates foo such that it is a pointer to the base of
an array that will hold 6 ints. The declaration 'int foo[6][2]' creates an
array (assuming data definition vice function declaration), or more properly a
base pointer to an array that is 6 x 2 (or simply observed, 12 elements of
'sizeof int' long).

Agreed that foo[6][2] and foo[12] create the same sized data space, and using
the same internal geometry.

Pete

There is 1 Reply.

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.