delorie.com/archives/browse.cgi | search |
From: | Nate Eldredge <neldredge AT hmc DOT edu> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Atof |
Date: | 18 Apr 2001 12:47:33 -0700 |
Organization: | InterWorld Communications |
Lines: | 28 |
Sender: | nate AT mercury DOT st DOT hmc DOT edu |
Message-ID: | <83y9syat2i.fsf@mercury.st.hmc.edu> |
References: | <3ADDDAE3 DOT 29499 DOT 112013C AT localhost> <OE282LTrpwACkWHZqYW00001f8d AT hotmail DOT com> <slrn9drnf6 DOT jqc DOT rpolzer AT www42 DOT t-offline DOT de> |
NNTP-Posting-Host: | mercury.st.hmc.edu |
Mime-Version: | 1.0 |
X-Trace: | nntp1.interworld.net 987623253 42580 134.173.57.219 (18 Apr 2001 19:47:33 GMT) |
X-Complaints-To: | usenet AT news DOT interworld DOT net |
NNTP-Posting-Date: | Wed, 18 Apr 2001 19:47:33 +0000 (UTC) |
User-Agent: | Gnus/5.0802 (Gnus v5.8.2) Emacs/20.5 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
rpolzer AT www42 DOT t-offline DOT de (echo 'Rudolf Polzer'>/dev/null) writes: > Norberto Alfredo Bensa <ceo AT nbensacomputers DOT com> wrote: > > > > > > > Hi, > > > i have this problem with atof(); > > > > > > char *buf = "-21.345\0"; > > > > while not a bug, you can write "-21.345"... > > BTW: Does it waste one byte? No. > That is, does "\000TEST" allocate one or six bytes? Five, actually. It seems that if the string contains a nul explicitly, the compiler will store it as written, but not automatically add another nul at the end at the end. This is useful for writing char sequences that aren't really strings in the concise string format. -- Nate Eldredge neldredge AT hmc DOT edu
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |