Passing sizes of arrays without a separate argument for the length

Brian Moffet brianm at sco.COM
Wed Sep 21 04:07:29 AEST 1988


In article <8809191507.AA17512 at ucbvax.Berkeley.EDU> U23405 at UICVM (Michael J. Steiner) writes:
>
>In other words, I had an idea of putting the maximum array dimension in
>the array itself. This should work with most arrays (since chars, floats,

>From what I have seen of BCPL (working with the translations on the
Amiga OS) this is classified as a BSTRING.  The size of the string is
the first element (up to 256 chars) and the string follows.

All in all a good idea, but sometimes really confusing when you have
to bit-shift the pointers by 2 to use them in C.  (BCPL pointers are
in word addressing, not byte addressing ).

brian moffet



More information about the Comp.lang.c mailing list