On Sat, 18 Nov 2006 20:12:23 +0000, john gilmore <[EMAIL PROTECTED]> wrote:
> 
> Moreover, it must be conceded that analogues of such PL/I constructs as
> 
> declare phantom_cs character(32767) based(pcsp) ;
> 
> pcsp = addr(<whatever>) ;
> 
> and
> 
> addr(<whatever>)->phantom_cs . . . ;
> 
> which permit any sequence of [here at most 32767] storage locations to be
> viewed as a character string, are now grudgingly available in C too; but the
> much more commonly used C asterisk notation declares a pointer to an
> instance of a particular scalar or structure.  C is more much strongly typed
> than PL/I; and Dennis Ritchie, its designer, has said more than once that he
> views this as desirable.
> 
Unfamiliar with PL/I as I am, I see little practical difference between the
above and the equivalent (as far as I understand the PL/I):

    typedef char[32767] phantom_cs;
        ...
    ... (phantom_cs) &whatever ...;

That said, I loathe C's reliance on null-terminated strings.  (Some claim,
with some validity, that this is more a feature of the Standard Function
Library than of the language proper.  But, practically, the two are
inseparable.)  This makes it impossible to abstract a substring from
a static string without allocating storage, diminishing the usefulness
of the constructs in the example.  The null-termination convention has
cross-infected the programming interfaces to most C kernels.  In contrast, the
BPX1* callable interfaces have boldly and laudably eschewed null-terminated
strings.

So, in answer to Bob Shannon's question:
                                           
   Linkname: IBM-MAIN archives -- August 2006 (#278)
   http://bama.ua.edu/cgi-bin/wa?A2=ind0608&L=ibm-main&D=1&amp;O=D&P=32264

... you may add one to the count.

-- gil
-- 
StorageTek
INFORMATION made POWERFUL

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to