[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: question about 0 as exp in repeat-until
- From: steve donovan <steve.j.donovan@...>
- Date: Thu, 21 Jan 2010 08:48:08 +0200
On Thu, Jan 21, 2010 at 8:34 AM, Joseph Stewart
<joseph.stewart@gmail.com> wrote:
> "while 0" is the same thing as saying "while true" (meaning loop forever or
> until "break"), by the same rule "until 0" is the same thing as saying
> "until true" which means only one pass through the loop.
Yes, old C habits die hard ;) Only nil or false fail as conditions.
(In Python, to give an example of an idea gone a little mad, empty
strings and empty lists are also considered 'false', but a list
containing an empty string is not (this is called 'falseness does not
nest').)
steve d.