From owner-freebsd-hackers Tue Jun 10 11:03:52 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id LAA20495 for hackers-outgoing; Tue, 10 Jun 1997 11:03:52 -0700 (PDT) Received: from garfield.cs.mun.ca (garfield.cs.mun.ca [134.153.1.1]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id LAA20490 for ; Tue, 10 Jun 1997 11:03:49 -0700 (PDT) Received: (from jr@localhost) by garfield.cs.mun.ca (8.8.5/8.8.5) id PAA01663; Tue, 10 Jun 1997 15:32:59 -0230 (NDT) Date: Tue, 10 Jun 1997 15:32:58 -0230 (NDT) From: John Rochester To: Michael Smith cc: hackers@FreeBSD.ORG Subject: Re: %i conversion in sscanf? In-Reply-To: <199706100002.JAA02000@genesis.atrad.adelaide.edu.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Tue, 10 Jun 1997, Michael Smith wrote: > Ollivier Robert stands accused of saying: > > According to Michael Smith: > > > It's "fairly" clear that %i might be expected to convert 0xABCDEF45 > > > to a negative number - Tcl thinks that way : > > > > > > silver:/tmp>tclsh > > > % expr 0xABCDEF45 > > > -1412567227 > > > > Interesting: > > > > 244 [22:29] roberto@keltia:~> perl -e 'print 0xABCDEF45 . "\n"' > > 2882400069 > > > > Perl 5.004 > > Hmm. What internal type does Perl use for numbers? Or does it decide that > the constant is too big and use a bignum? perl uses floating point. double, I assume, but I don't know for sure. ----- John Rochester jr@cs.mun.ca Dept. of Computer Science Memorial University of Newfoundland, St. John's, Newfoundland, Canada