home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.compilers      Compiler construction, theory, etc. (Mod      2,753 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 1,577 of 2,753   
   Louis Krupp to Tony   
   Re: Internal Representation of Strings   
   14 Feb 09 19:41:20   
   
   From: lkrupp@pssw.nospam.com.invalid   
      
   Tony wrote:   
   > What are some good ways/concepts of internal string representation?   
   > Are/should string literals, fixed-length strings and dynamic-lenght strings   
   > handled differently? My first tendency is to avoid like the plague   
   > NUL-terminated strings (aka, C strings) and to opt for some kind of array   
   > with a length at the beginning followed by the characters that could be   
   > encapsulated at the library level with appropriate functions. But just a   
   > length seems like not enough information: the capacity (array length) also   
   > would be nice to have around. All thoughts, old and novel, welcome.   
      
   You might be able to use the VMS descriptor for inspiration.  Google for   
   "descrip.h," "OpenVMS descriptor," etc.   
      
   Louis   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca