Topic: reading numbers from stream
Author: c9524@rrzc1a (Ulrich Windl)
Date: 11 Oct 1993 08:42:46 GMT Raw View
I've noticed (to my big surprise) that the Borland C++ library reads in
numbers in a strange way: If the number begins with digit '0' (zero) it is
treated as octal!!! I did not find any reference to this behaviour; so can
someone tell me if this is a feature or a bug?
Direct replies preferred.
Ulrich
----------------------------------------
Ulrich Windl
Universitaet Regensburg, Rechenzentrum DV-med
Franz-Josef-Strauss-Allee 11
D-93042 Regensburg, Germany
---
SMTP: c9524@rrzc1.rz.uni-regensburg.de (Sun, my favorite)
SMTP: uw@rklnw1.ngate.uni-regensburg.de (PC, Pegasus Mail)
X.400: ulrich.windl@rkls1.klinik.uni-regensburg.dbp.de (the higher force)
Author: walker@twix.unx.sas.com (Doug Walker)
Date: Mon, 11 Oct 1993 14:40:32 GMT Raw View
In article <29b6a6INNnr6@rrzs3.uni-regensburg.de>, c9524@rrzc1a (Ulrich Windl) writes:
|> I've noticed (to my big surprise) that the Borland C++ library reads in
|> numbers in a strange way: If the number begins with digit '0' (zero) it is
|> treated as octal!!! I did not find any reference to this behaviour; so can
|> someone tell me if this is a feature or a bug?
Leading 0 indicates octal in both C and C++.
Please direct this kind of question to comp.lang.c++, not comp.std.c++.
--
***** / walker@unx.sas.com
*|_o_o|\\ Doug Walker< BIX, Portal: djwalker
*|. o.| || \ CompuServe: 71165,2274
| o |//
======
Any opinions expressed are mine, not those of SAS Institute, Inc.