[gambit-list] Running gambit program

Francois Magnan magnan at categoricaldesign.com
Tue Mar 19 12:07:15 EDT 2013


Hi,

Maybe you could try to add a 

(display "\n")

before your (exit).

I think maybe the unix prompt is overwriting your output. This happened to me once.

François Magnan



On 2013-03-19, at 11:57, Steve Graham <jsgrahamus at yahoo.com> wrote:

> Thanks, Marc.  I don't see why I'm having these problems either.  It worked fine under Windows 7.
> 
> steve at steve-Satellite-L555D ~/Desktop $ cat test.scm
> (display (+ 1 2))
> (exit)
> 
> steve at steve-Satellite-L555D ~/Desktop $ gsi test.scm
> Gambit v4.6.7
> 
> > ,q
> steve at steve-Satellite-L555D ~/Desktop $ gsi
> Gambit v4.6.7
> 
> > (display (+ 1 2))
> 3> (exit)
> steve at steve-Satellite-L555D ~/Desktop $ gsi :d- test.scm
> Gambit v4.6.7
> 
> > ,q
> steve at steve-Satellite-L555D ~/Desktop $ 
> 
> 
> From: Marc Feeley <feeley at iro.umontreal.ca>
> To: Steve Graham <jsgrahamus at yahoo.com> 
> Cc: Gambit List <Gambit-list at iro.umontreal.ca> 
> Sent: Tuesday, March 19, 2013 9:45 AM
> Subject: Re: [gambit-list] Running gambit program
> 
> 
> On 2013-03-19, at 11:31 AM, Steve Graham <jsgrahamus at yahoo.com> wrote:
> 
> > Trying to figure out how to run a Gambit-C program from a Linux shell script.  
> > 
> > These don't seem to work:
> > gsi <filename>
> > gsi - <filename>
> > gsi -e <filename>
> > 
> > What does work?
> > 
> > Thanks, Steve
> 
> I'm not sure what form of "shell script" you are trying to create.  The first form, i.e.
> 
>     gsi <filename>
> 
> should work fine.  I don't see why it doesn't work for you.  It the problem is that you want the REPL I/O to go to stdin/stdout (for example if you want (pp ...) to got to stdout), then start gsi this way:
> 
>     gsi -:d- <filename>
> 
> You can also write Scheme shell scripts on unix by using the following shebang line:
> 
>     #! /usr/bin/env gsi
>     ...scheme code
> 
> Marc
> 
> 
> 
> _______________________________________________
> 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/20130319/ab182c4a/attachment.htm>


More information about the Gambit-list mailing list