From ... From: Erik Naggum Subject: Re: Access the the second return value? Date: 2000/07/03 Message-ID: <3171623893332559@naggum.net>#1/1 X-Deja-AN: 641860888 References: <3959B48D.835EA63E@spam.com> <87aeg65h7a.fsf@q-software-solutions.com> <87itutcge8.fsf@quadium.net> <8jj3sn$ikm$1@newssvr03-int.news.prodigy.com> <3171439197402294@naggum.net> <395e5892@news.sentex.net> <395f46bf$1_2@spamkiller.newsfeeds.com> <3171547074485720@naggum.net> <395f84dd_2@spamkiller.newsfeeds.com> <395fb14e@news.sentex.net> <39607dcd_4@spamkiller.newsfeeds.com> mail-copies-to: never Content-Type: text/plain; charset=us-ascii X-Complaints-To: newsmaster@eunet.no X-Trace: oslo-nntp.eunet.no 962637647 1653 195.0.192.66 (3 Jul 2000 15:20:47 GMT) Organization: Naggum Software; vox: +47 8800 8879; fax: +47 8800 8601; http://naggum.no; http://naggum.net User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7 Mime-Version: 1.0 NNTP-Posting-Date: 3 Jul 2000 15:20:47 GMT Newsgroups: comp.lang.lisp * "Janos Blazi" | You always had to use zero terminated strings in C, there was no way | to circuvent them Wrong. The language does initialize literal strings in the code to be zero-terminated, but there's nothing that actually requires this apart from the standard C library. Software written in C that does not use literals in the source code don't have to deal with this at all if they don't want to. Several Pascal systems have used a length word (16 bits) before the data. A simple way to deal with C and Pascal is thus to allocate three bytes too many, relative to the exact length, and write the length before the string and a zero byte after it. Some Common Lisp systems also do this zero byte thing for the benefit of their FFIs. | (it took me several minutes to figure out that in LDB the byte does | not necessarily starts at a byte boundary; it is a powerful | function). You would have spent less time if you had looked up "byte" in the glossary of the HyperSpec. The 8-bit byte is a story of IBM taking over the meaning of perfectly good words. | (The reason for zero terminated strings was that on their first | machine (PDP?) they used hardwate to find such zeroes.) Wrong. (Except in the trivial sense that one _always_ uses hardware when executing programs of any kind.) | And in C++ zero terminated strings still were in use, though they | became less important. Wrong. ISO/IEC 14882:1998(E) [lex.string] 2.13.4 String literals 4 After any necessary concatenation, in translation phase 7 (2.1), '\0' is appended to every string literal so that programs that scan a string can find its end. | No, I did not know about this (as usual). So call it Lisp3. Why not just _drop_ this silliness? #:Erik -- If this is not what you expected, please alter your expectations.