From: NicknameOptional
Subject: why 100% cpu usage
Date: 
Message-ID: <1145362413.428426.129660@u72g2000cwu.googlegroups.com>
What part of this code causes 100% cpu usage when it is running?

(defun sqrt-advisor ()
   (loop (format t "~&Number: ")
         (let ((n (parse-integer (read-line) :junk-allowed t)))
           (when (not n) (return))
           (format t "~&The square root of ~D is ~D.~%" n (sqrt n)))))

If this matters, I am using:
ACL 7.0 trial on a Dell XP laptop  
512 megs mem

-newbie

From: Alan Manuel K. Gloria
Subject: Re: why 100% cpu usage
Date: 
Message-ID: <1145362845.405233.198600@t31g2000cwb.googlegroups.com>
read-line?
From: ···············@yahoo.com
Subject: Re: why 100% cpu usage
Date: 
Message-ID: <1145368442.847789.263680@u72g2000cwu.googlegroups.com>
Alan Manuel K. Gloria wrote:
> read-line?

Yes, the original poster should post the code for read-line.
From: Bill Atkins
Subject: Re: why 100% cpu usage
Date: 
Message-ID: <877j5ngd6e.fsf@rpi.edu>
···············@yahoo.com writes:

> Alan Manuel K. Gloria wrote:
>> read-line?
>
> Yes, the original poster should post the code for read-line.

Is this a joke?  READ-LINE is part of Common Lisp.

Bill
From: NicknameOptional
Subject: Re: why 100% cpu usage
Date: 
Message-ID: <1145450508.130917.82830@z34g2000cwc.googlegroups.com>
I posed the same question to Franz, Inc., and received this reply:

-------
Re: [spr31519] what causes 100% cpu usage?

Further research shows this only happens on Windows when running the
IDE (if you bring up the console window and try it, you do not see the
100% cpu usage).  This is then an IDE problem and we will likely
address it soon.

David Margolies
Franz Inc.

--------


The code sample comes straight from the Common Lisp Hyperspec for
"Loop" at  http://www.lisp.org/HyperSpec/Body/mac_loop.html

As for "read-line", it can be also be found in the Hyperspec.
http://www.lisp.org/HyperSpec/Body/fun_read-line.html
From: ···············@yahoo.com
Subject: Re: why 100% cpu usage
Date: 
Message-ID: <1145453205.475462.115590@e56g2000cwe.googlegroups.com>
Sorry, I should have checked the hyperspec before posting.