[gambit-list] Error when loading/running

Steve Graham jsgrahamus at yahoo.com
Mon Oct 31 12:27:53 EDT 2011


Thanks, all.

I noticed that I "print" will not handle decimals properly.  I've googled for formatted output for Gambit and Scheme and haven't found any info on this that applies to Gambit.  Have also looked in the latest version of The Scheme Programming Language and it also does not deal with formatted decimals, although it does mention printf, which Gambit seems to lack.

Any comments on how to print formatted decimals?

Thanks again, Steve


________________________________
From: Jeff Read <bitwize at gmail.com>
To: Steve Graham <jsgrahamus at yahoo.com>; gambit List <gambit-list at iro.umontreal.ca>
Sent: Monday, October 31, 2011 9:51 AM
Subject: Re: [gambit-list] Error when loading/running


You have a single quote floating out there with nothing after it.
You probably should also define hrs1 and hrs2 to something, and not rely on `set!' to return a value.
On Oct 31, 2011 11:45 AM, "Steve Graham" <jsgrahamus at yahoo.com> wrote:

Newbie here.  I'm trying to run a scheme program from gsi and getting an error I don't understand:
>
>
>C:\gambit\gambitv4.6.2\v4.6.2\bin>type timecalc.sch
>(define hrs1)
>(define hrs2)
>(display "Hrs 1: ") (set! hrs1 (read))
>(display "\nHrs 2: ") (set! hrs2 (read))
>
>
>(print "\n\n" (+ hrs1 hrs2) " hours --> $" (* (+ hrs1 hrs2) 22))'
>
>
>C:\gambit\gambitv4.6.2\v4.6.2\bin>gsi -:d0 timecalc.sch
>
>
>C:\gambit\gambitv4.6.2\v4.6.2\bin>gsi timecalc.sch
>*** ERROR IN "timecalc.sch"@7.1 -- Datum expected
>
>
>C:\gambit\gambitv4.6.2\v4.6.2\bin>gsi
>Gambit v4.6.2
>
>
>> (load "timecalc.sch")
>*** ERROR IN "timecalc.sch"@7.1 -- Datum expected
>1>
>
>
>Any tips?
>
>
>TIA, Steve
>_______________________________________________
>Gambit-list mailing list
>Gambit-list at iro.umontreal.ca
>https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20111031/aa2097ee/attachment.htm>


More information about the Gambit-list mailing list