Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!newsfeed.pitt.edu!gatech!newsfeed.internetmci.com!vixen.cso.uiuc.edu!uwm.edu!lll-winken.llnl.gov!ames!eos!kronos.arc.nasa.gov!ptolemy.arc.nasa.gov!kpc
From: k p c <kpc@ptolemy.arc.nasa.gov>
Subject: Re: Convert Strings Into Numbers (integer, float)
In-Reply-To: berndl@vogelweide.uni-passau.de's message of 10 Jan 1996 13:57:27
	GMT
Message-ID: <1996Jan10.233410.5754@ptolemy-ethernet.arc.nasa.gov>
To: berndl@vogelweide.uni-passau.de (Klaus Berndl)
X-Disclaimer: No organization, company, or government is represented here.
X-Attribution: kpc
Lines: 21
Sender: usenet@ptolemy-ethernet.arc.nasa.gov (usenet@ptolemy.arc.nasa.gov)
Nntp-Posting-Host: phenotype.arc.nasa.gov
Reply-To: kpc@ptolemy.arc.nasa.gov
Cc: kpc@ptolemy.arc.nasa.gov
Organization: NASA Ames Research Ctr, Information Sciences Div and Aero Facil
	Branch.  Disclaimer: neither a civil servant nor a representative.
References: <4d0gk7$t63@news.rz.uni-passau.de>
Date: Wed, 10 Jan 1996 23:42:17 GMT

Quoth berndl@vogelweide.uni-passau.de (Klaus Berndl):
> Exists there a function or a macro in Common Lisp (Allegro CL 4.2)?

You can use read-from-string and parse-integer.  read-from-string is
the comprehensive way to do it.  Look at the documentation for
with-standard-io-syntax and *read-eval*.

Note that my profiling shows that Allegro CL 4.2 read-from-string is
slow.

Consider a freeware parse-float that is floating around somewhere.  I
don't know if it is more efficient than read-from-string or not,
however.

By the way, please keep your line lengths below 77 characters.

If you post a followup to this article, I would appreciate a courtesy
verbatim copy by email to help work around potentially unreliable feeds.

---
kpc@ptolemy.arc.nasa.gov.  AI, multidisciplinary neuroethology, info filtering.
