Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!hp4nl!mhres!squirrel!pronto!jv From: jv@mh.nl (Johan Vromans) Newsgroups: comp.lang.perl Subject: Re: alpha numbers Message-ID: <1991Jun27.082309.5793@pronto.mh.nl> Date: 27 Jun 91 08:23:09 GMT References: <1991Jun23.200134.18835@pronto.mh.nl> <1991Jun24.231628.14446@jpl-devvax.jpl.nasa.gov> <1991Jun25.134732.1668@pronto.mh.nl> <3708@wn1.sci.kun.nl> Sender: jv@pronto.mh.nl (Johan Vromans) Reply-To: Johan Vromans Organization: Multihouse Automation, the Netherlands Lines: 24 In-Reply-To: hansm@cs.kun.nl's message of 26 Jun 91 14:20:37 GMT X-Md4-Signature: 33aa4ddc63c401e6964018d4b9f32e10 In article <3708@wn1.sci.kun.nl> hansm@cs.kun.nl (Hans Mulder) writes: > Are you sure you want this? Consider: > $a="1d8"; > print ++$a; # prints 1d9 > print ++$a; # prints 1e0 > print ++$a; # prints 2, since $a is now numeric. > > Magical increment, indeed. Okay, let's drop the magical increment part of my original posting. I still would like opinions on getting a warning (when using '-w') in situations where aritmetic is performed on a ill-formed number. In general, this would require an explicit syntax check before calling atof on a string. Johan -- Johan Vromans jv@mh.nl via internet backbones Multihouse Automatisering bv uucp: ..!{uunet,hp4nl}!mh.nl!jv Doesburgweg 7, 2803 PL Gouda, The Netherlands phone/fax: +31 1820 62911/62500 ------------------------ "Arms are made for hugging" -------------------------