qp.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
CSTRING: C String Type Compatibility
  Keywords Contents Index                                   Back
 
  Description
 
    A CSTRING is an array of characters. In the array, the null
    character (ASCII 0) is interpreted as a terminator, but is not
    considered part of the string itself.
 
    CSTRING has a default and maximum length of 255 characters. It is
    declared in the same way as a Pascal string.
 
    QuickPascal automatically allocates space for the terminating
    null. Thus, with
 
       CONST s : CSTRING = '123';
 
    SizeOf(s) is 4.
 
    The layout in memory will be
 
      '1', '2', '3', #0
 
    Procedures and functions that work for STRINGs work for CSTRINGs
    (except referring to s[0] as the length). Since they are
    assignment-compatible, they may be freely intermixed.
 
    Pascal strings with imbedded null characters sometimes behave in
    unexpected ways when mixed with CSTRINGs.
 
  See also:  STRING