Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Could one split a number in a source file?

1 view
Skip to first unread message

Shin

unread,
Nov 11, 1999, 3:00:00 AM11/11/99
to
I have to setq a variable to an integer that has 379 digits, is
allowed to split the number somehow or must it be in a sole line?

Thanks,

-- Shin

Barry Margolin

unread,
Nov 11, 1999, 3:00:00 AM11/11/99
to
In article <382a77c5...@news.iddeo.es>, Shin <f...@retemail.es> wrote:
>I have to setq a variable to an integer that has 379 digits, is
>allowed to split the number somehow or must it be in a sole line?

The following is the best I can come up with:

(setq x
#.(parse-integer
(concatenate 'string
"12345"
"67891"
"23456"
...))

Also, if those 379 digits are the result of a computation, you can make the
reader do the computation for you by using '#.'.

--
Barry Margolin, bar...@bbnplanet.com
GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

Raffael Cavallaro

unread,
Nov 11, 1999, 3:00:00 AM11/11/99
to
In article <382a77c5...@news.iddeo.es>, f...@retemail.es (Shin) wrote:

>I have to setq a variable to an integer that has 379 digits, is
>allowed to split the number somehow or must it be in a sole line?

Couldn't you also just read it in from a file?

Raf

--

Raffael Cavallaro, Ph.D.
raf...@mediaone.net

Clemens Heitzinger

unread,
Nov 11, 1999, 3:00:00 AM11/11/99
to
Shin <f...@retemail.es> wrote:

> I have to setq a variable to an integer that has 379 digits, is
> allowed to split the number somehow or must it be in a sole line?

In the listener: don't split it.

When reading from a file: it's easier to read when the number is not
splitted; of course you can always read the parts and paste them
together.

--
Clemens Heitzinger
http://ag.or.at:8000/~clemens (Lisp related material)

0 new messages