Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.pascal.borland    |    Borland Pascal was actually pretty neat    |    2,978 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 1,633 of 2,978    |
|    John Smith to All    |
|    Re: Getting a real number from the keybo    |
|    27 May 05 15:48:59    |
   
   From: assemblywizard@gmail.com   
      
   To help you get up to speed:   
      
      
   THIS FROM PAGES 31 & 32 OF "BORLAND PASCAL WITH OBJECTS LANGUAGE GUIDE 7.0."   
      
   . where M is less than N is called a "packed string type" (the word "packed"   
   can be omitted because it has no effect in Borland Pascal.)   
      
   A packed string type has certain properties not shared by other array types,   
   as explained below.   
      
      
      
   An array type of the form.   
      
      
      
   Array[0..X] of char   
      
      
      
   Where X is a positive nonzero integer is called a "zero-based character   
   array. Zero-based character arrays are used to store "null-terminated   
   strings", and when the extended syntax is enabled (using a {$X+} compiler   
   directive), a zero-based character array is compatible with a PChar value.   
   For a complete discussion of this topic, read Chapter 18, "Using   
   null-terminated string," beginning on page 217.   
      
      
      
   THIS FROM PAGE 217 OF THE SAME MANUAL:   
      
   The biggest difference between using Pascal string and null-terminated   
   strings is the extensive use of pointers in the manipulation of   
   null-terminated strings. Borland Pascal performs operations on these   
   pointers with a set o extended syntax rules.   
      
   ..and... same page.   
      
   When extended syntax is enabled, a string literal is assignment-compatible   
   with the PChar type. This means that a string literal can be assigned to a   
   variable of type PChar. For example,   
      
   VAR   
      
    P: PChar;   
      
      
      
   Begin   
      
   P := 'Hello world.';   
      
   End;   
      
      
      
   FROM PAGE 215 of the same manual:   
      
   A null-terminated string has no length byte; instead, it consists of a   
   sequence of non-null character followed by a NULL (#0).   
      
      
      
   John   
      
   "Jim Leonard"
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca