home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / modula3 / 1171 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  1.2 KB

  1. Path: sparky!uunet!europa.eng.gtefsd.com!gatech!udel!bogus.sura.net!howland.reston.ans.net!spool.mu.edu!olivea!hal.com!decwrl!src.dec.com!bismol.pa.dec.com!muller
  2. From: muller@src.dec.com (Eric Muller)
  3. Newsgroups: comp.lang.modula3
  4. Subject: Re: What is the representation of Text?
  5. Message-ID: <1993Jan28.180905.21018@src.dec.com>
  6. Date: 28 Jan 93 18:09:05 GMT
  7. References: <1993Jan25.230239.45587@slate.mines.colorado.edu> <FN00.93Jan27115929@tahoe.gte.com>
  8. Sender: news@src.dec.com (News)
  9. Organization: DEC Systems Research Center
  10. Lines: 22
  11.  
  12. In article <FN00.93Jan27115929@tahoe.gte.com>, fn00@gte.com (Farshad Nayeri) writes:
  13.  
  14. |> Looking at the libm3 source, I can see that "Text"s _are_
  15. |> null-terminated, but I can't find any part of the code that _uses_ the
  16. |> null-termination (instead, a combination of memcpy and NUMBER is used).
  17. |> 
  18. |> So, _why_ are "Text"s null-terminated?
  19. |> 
  20. |> I can think of two possiblities: 
  21. |> 
  22. |> a) it makes debugging easier in a c-oriented debugger.
  23.  
  24. That's the correct answer.
  25.  
  26. |> b) some of the lower layers of the code (like the compiler) uses this
  27. |>    assumption.
  28.  
  29. M3toC.TtoS uses it.  It breaks when you try to convert a Text.T with a
  30. '\000' in it, but you cannot represent such a string anyway.
  31.  
  32. -- 
  33. Eric.
  34.