RE: null terminated strings
- From: "O'Brien Paddy" <Paddy.O'Brien@xxxxxxxxxxxxxxxx>
- Date: Tue, 14 Feb 2006 19:47:02 +1100
-----Original Message-----
From: O'Brien Paddy [mailto:Paddy.O'Brien@xxxxxxxxxxxxxxxx]
Sent: Tuesday, February 14, 2006 7:37 PM
To: Info-VAX@xxxxxxxxxxxx
Subject: RE: null terminated strings
I can't keep chevronning, asterisks are where my reply starts from.
-----Original Message-----
From: Bob Koehler [mailto:koehler@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]
Sent: Tuesday, February 14, 2006 12:24 AM
To: Info-VAX@xxxxxxxxxxxx
Subject: Re: null terminated strings
In article <43ED8BC8.6B225724@xxxxxxxxxxxx>, JF Mezei <jfmezei.spamnot@xxxxxxxxxxxx> writes:
Not all "arrays" are declared as arrays. You can declare a structure
(record format) and then dynamically alloacte a buffer big eough to
contain a dynamically calculated number of instances of that record. You
can then use pointers to access individual elements within that buffer.
C also allows you to pass this pointer to a called subroutine which
expected an argument of that structure type and the subroutine can then
access that array.
Also, it allows you to pass not just the base element of the array , but
also the address of the nth element of the array and the subroutine
treats that nth element as element 0. (eg: skip processing the first 5
records by passing the address of the 6th record instead of that of the
first record).
All of which I've done in Fortran-77 without pointers.
(OK, for structures I was using VAX Fortran extensions, but I did
those in Fortran-IV without the extensions).
*****
(And I stupidly missed out the asterisks)
There seems to be some confusion here from JF, and the terminology between languages seems to getting mixed up. I think what JF is "waffling" around (no offense, could not think of a better word) is the Digital calling standard. What you have described (without going into any details of other languages) is the way a Fortran program would process any of the arguments you mention.
Bob,
I've needed pointers in my nearly 50-year programming existence. O.K. don't understand your parenthasised meaning. Did you mean that you were simulating them? 'Cos I have no knowledge of structures, per se, prior to the VAX extension. Simulation, yes, in the days when we used EQUIVALENCE :-)
Regards, Paddy
***********************************************************************
Please consider the environment before printing this email.
"This electronic message and any attachments may contain privileged
and confidential information intended only for the use of the
addressees named above. If you are not the intended recipient of
this email, please delete the message and any attachment and advise
the sender. You are hereby notified that any use, dissemination,
distribution, reproduction of this email is prohibited.
If you have received the email in error, please notify TransGrid
immediately. Any views expressed in this email are those of the
individual sender except where the sender expressly and with
authority states them to be the views of TransGrid. TransGrid uses
virus-scanning software but excludes any liability for viruses
contained in any attachment.
Please note the email address for TransGrid personnel is now
firstname.lastname@xxxxxxxxxxxxxxxx"
***********************************************************************
***********************************************************************
Please consider the environment before printing this email.
"This electronic message and any attachments may contain privileged
and confidential information intended only for the use of the
addressees named above. If you are not the intended recipient of
this email, please delete the message and any attachment and advise
the sender. You are hereby notified that any use, dissemination,
distribution, reproduction of this email is prohibited.
If you have received the email in error, please notify TransGrid
immediately. Any views expressed in this email are those of the
individual sender except where the sender expressly and with
authority states them to be the views of TransGrid. TransGrid uses
virus-scanning software but excludes any liability for viruses
contained in any attachment.
Please note the email address for TransGrid personnel is now
firstname.lastname@xxxxxxxxxxxxxxxx"
***********************************************************************
.
- Prev by Date: Re: null terminated strings
- Next by Date: Re: cluster-wide logicals and startup
- Previous by thread: Re: null terminated strings
- Next by thread: Re: DECnet: reconfigure TCPIP?
- Index(es):
Relevant Pages
|