<div dir="ltr">Hello Horace,<br><br>I thank you for patiently explaining me how to run racket from command line.<br><br>Actually, this is not exactly what I am looking for.<br><br>What I want is a script file. Such that I can test the modules of the program from command prompt. <br>
<br>Something like <br><br>*******<br>#!/bin/bash<br>racket -f "file.rkt"<br><br>racket (twice 2)<br>*******<br><br>Thanks in advance,<br>Colum<br><br><br><div class="gmail_quote">On Mon, Sep 27, 2010 at 4:39 PM, Horace Dynamite <span dir="ltr"><<a href="mailto:horace.dynamite@gmail.com">horace.dynamite@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">> Say, the racket file is file.rkt<br>
><br>
> ***********<br>
> (define (twice x)<br>
> (* 2 x))<br>
><br>
> and so on....<br>
><br>
> **********<br>
><br>
> I want to test if (twice 2) is 4 from the command line.<br>
<br>
</div>You need to know what "folder" or "directory" you saved the file in.<br>
Lets say it's in C:\racket\<br>
<br>
Click Start -> Run and type "cmd" (without the quotes)<br>
Then type (again, without quotes)<br>
"cd C:\racket\"<br>
<br>
(or you could pass the full path to enter! (see below) instead)<br>
<br>
If the racket executable is in your path, you should be able to type<br>
"racket.exe" and have the racket program waiting for your input. If<br>
this is not the case, you need to find out where your racket<br>
executable is. Try "C:\program files\Racket\racket.exe".<br>
<br>
If that doesn't work, hunt through you're program files folder to see<br>
where you installed Racket.<br>
<br>
Once the racket program is waiting on your input, type "(enter!<br>
"file.rkt")" and you should be all set, then you may type "(twice 2)"<br>
and see the result.<br>
<br>
This will only work if you "cd"'d into the correct folder above.<br>
<br>
More experienced users have made running racket from the "command<br>
line" like this more convenient by setting up their favourite editor<br>
to automatically launch the racket program, and to make sure it's in<br>
the folder their racket files are located.<br>
<br>
If this all sounds too complicated (it does to me), I'd strongly<br>
suggest you use DrRacket.<br>
<br>
Hope that helps,<br>
<font color="#888888"><br>
Horace.<br>
</font></blockquote></div><br></div>