🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: vmsnet.internals
Article #379

(None)

#379
From: REGI's
Date: Thu, 15 Oct 1992 15:30
60 lines
2631 bytes
>X-Envelope-to: MACRO32@WKUVX1.bitnet
>X-VMS-To: IN::"MACRO32@WKUVX1.BITNET"

1
13-OCT-1992 01:59:10.29
   1 00:00:00.00
14-OCT-1992 01:59:10.29
@UKCC.uky.edu:MacroMan@WKUVX1.BITNET
gutier@SEVAXU.CICA.ES

Received: from UKCC.uky.edu by ESEVVX.CICA.ES ; 10-OCT-1992 01:59:08.23
Received: from ukcc.uky.edu by UKCC.uky.edu (IBM VM SMTP V2R2)
   with BSMTP id 6855; Fri, 09 Oct 92 20:58:02 EDT
Received: from WKUVX1.BITNET by ukcc.uky.edu (Mailer R2.08) with BSMTP id 9814;
 Fri, 09 Oct 92 20:58:01 EDT
Errors-To: MacroMan@WKUVX1.BITNET
X-ListName: "VMS Internals, MACRO, and BLISS Discussions"
    <MACRO32@WKUVX1.BITNET>
Received: from CUNYVM.BITNET (MAILER) by WKUVX1 (MX V3.1C) with BSMTP; Fri, 09
          Oct 1992 19:50:39 CDT
Received: from CUNYVM by CUNYVM.BITNET (Mailer R2.08) with BSMTP id 6607; Fri,
          09 Oct 92 20:37:34 EDT
Received: from MVB.SAIC.COM by CUNYVM.CUNY.EDU (IBM VM SMTP V2R2) with TCP;
          Fri, 09 Oct 92 20:37:32 EDT
From: <gjc@mitech.com>
Reply-To: MACRO32@WKUVX1.BITNET
X-Newsgroups: vmsnet.internals
Subject: Re:  C Language question
Message-ID: <3067@mitech.com>
Date: 9 Oct 92 14:32:00 GMT
References: <718580974.504412.MILLER@TGV.COM>
Organization: Mitech Corporation, Concord MA
Lines: 24
To: MACRO32@WKUVX1.BITNET
X-Gateway-Source-Info: USENET

In article <718580974.504412.MILLER@TGV.COM>, MILLER@TGV.COM writes:
> Remember:  a[i] really means *(a+i) using the rules for pointer addition.
> a[i] is a macro construct.
> So a[i][j] really works out to *((char *)&*(a+i) + j), I think.

Hey, the guy who said to ask this on comp.lang.c is only 50%
correct. This is FAQ item!

But anyway, not true in all cases. In other words, if you see this in a program:

   a[i][j]

you don't really know if it means reference a vector of vectors or not.

It all depends on how a was declared. If char a[][], or char **a, that
is one thing.

But, it may also have been declared char a[5][10]. In which case
the resulting memory operations are more like what you would expect from
FORTRAN. Not two memory references but one.

The is one of the funky things about the C programming language.

-gjc
Technical Details
Message-ID: <01GPZFVDJLJ40001ZZ@esevvx.cica.es>
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!news.service.uci.edu!unogate!mvb.saic.com!macro32

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!news.service.uci.edu!unogate!mvb.saic.com!macro32
From: REGI's <NUNEZ@esevvx.cica.es>
Newsgroups: vmsnet.internals
Subject: (None)
Message-ID: <01GPZFVDJLJ40001ZZ@esevvx.cica.es>
Date: Thu, 15 Oct 1992 16:30:00 UTC+0100
Organization: Macro32<==>Vmsnet.Internals Gateway
X-Gateway-Source-Info: Mailing List
Lines: 60