scsh-users
[Top] [All Lists]

Re: Subtracting integers

To: Eric Hanchrow <offby1@blarg.net>
Subject: Re: Subtracting integers
From: Martin Gasbichler <gasbichl@informatik.uni-tuebingen.de>
Date: Tue, 22 Apr 2003 09:05:46 +0200
Cc: scsh-news@zurich.ai.mit.edu
>>>>> "Eric" == Eric Hanchrow <offby1@blarg.net> writes:

Eric>     Subtracting integers isn't working as I for one would expect:

Eric>     Millie:norman/stuff> scsh
Eric>     Welcome to scsh 0.6.4 (Olin Shivers)
Eric>     Type ,? for help.
>> (- 3 4)
Eric>     -1
>> (- 3 4 5)

Eric>     Warning: invalid arguments

Eric> That surprised me, too, until I read R5RS, where it says that the -
Eric> and / functions aren't required to take more than two arguments.
Eric> Granted, every other Scheme that I've played with allows more than two
Eric> arguments, but scsh chooses not to.

Scsh inherits this behavior from its underlying Scheme implementation
Scheme 48, which doesn't support more than 2 arguments for - and /.

-- 
Martin

<Prev in Thread] Current Thread [Next in Thread>