Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Mar 2004 07:29:16 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Wayne Sierke <ws+freebsd-questions@au.dyndns.ws>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Size of variables in awk
Message-ID:  <20040303072916.GD96929@happy-idiot-talk.infracaninophile.co.uk>
In-Reply-To: <1078286126.666.11.camel@ovirt.dyndns.ws>
References:  <1078286126.666.11.camel@ovirt.dyndns.ws>

next in thread | previous in thread | raw e-mail | index | archive | help

--fOHHtNG4YXGJ0yqR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Mar 03, 2004 at 02:25:27PM +1030, Wayne Sierke wrote:
> It seems I've run into the 32-bit signed number wall in awk
> (5.2-RELEASE).
>=20
> My totals are maxing out at 2147483648.
>=20
> Would anyone happen to know whether that's really the case (that awk is
> only implemented with 32-bit number capability - unfortunately I don't
> have any other awks nearby to verify nor can I find any reference info
> that indicates) and/or can suggest a way around it?

Use perl instead?  Perl should switch from an integer to a floating
point representation internally if it runs over MAXINT.  You should be
able to use a2p(1) to automatically convert your awk code into perl.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

--fOHHtNG4YXGJ0yqR
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFARYlMdtESqEQa7a0RAuVzAJ90NA6Mkt3E5/eMLtFjx30fBjblYACePl+f
QxWxMnnXZH4r70Fu8ISYnYE=
=EvRC
-----END PGP SIGNATURE-----

--fOHHtNG4YXGJ0yqR--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040303072916.GD96929>