home *** CD-ROM | disk | FTP | other *** search
- 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
- From: muller@src.dec.com (Eric Muller)
- Newsgroups: comp.lang.modula3
- Subject: Re: What is the representation of Text?
- Message-ID: <1993Jan28.180905.21018@src.dec.com>
- Date: 28 Jan 93 18:09:05 GMT
- References: <1993Jan25.230239.45587@slate.mines.colorado.edu> <FN00.93Jan27115929@tahoe.gte.com>
- Sender: news@src.dec.com (News)
- Organization: DEC Systems Research Center
- Lines: 22
-
- In article <FN00.93Jan27115929@tahoe.gte.com>, fn00@gte.com (Farshad Nayeri) writes:
-
- |> Looking at the libm3 source, I can see that "Text"s _are_
- |> null-terminated, but I can't find any part of the code that _uses_ the
- |> null-termination (instead, a combination of memcpy and NUMBER is used).
- |>
- |> So, _why_ are "Text"s null-terminated?
- |>
- |> I can think of two possiblities:
- |>
- |> a) it makes debugging easier in a c-oriented debugger.
-
- That's the correct answer.
-
- |> b) some of the lower layers of the code (like the compiler) uses this
- |> assumption.
-
- M3toC.TtoS uses it. It breaks when you try to convert a Text.T with a
- '\000' in it, but you cannot represent such a string anyway.
-
- --
- Eric.
-