You'll want to look at dynamic-require for this. Require forms do not accept 
arbitrary Racket expressions because they are used at compile time.
-Ian
----- Original Message -----
From: "Boshra Nabaei" <b.nab...@gmail.com>
To: "Danny Yoo" <d...@hashcollision.org>
Cc: users@racket-lang.org
Sent: Wednesday, March 20, 2013 3:26:51 PM GMT -05:00 US/Canada Eastern
Subject: Re: [racket] want to pass argument via terminal in linux






Thanks a lot!! it works but small problem: 
--------------------------------------- 
in command line: 
racket program.rkt test-case.rkt 
------------------------------------------ 



in program.rkt: 
(define case (current-command-line-arguments)) 
(display case) 
(require case) 


------------------------------------------ 


display works fine, but require 

gets this error: 
......................................... 
case: standard-module-name-resolver: collection not found 
collection: "case" 
in collection directories: 
C:\Users\boshra14\AppData\Roaming\Racket\5.3.1\collects 
C:\Program Files\Racket\collects in: case 
.......................................... 






On Wed, Mar 20, 2013 at 11:25 AM, Danny Yoo < d...@hashcollision.org > wrote: 



On Wed, Mar 20, 2013 at 7:34 AM, Boshra Nabaei < b.nab...@gmail.com > wrote: 
> Thanks a lot Danny! 
> Now after inputting string(the name if he test-case file) I want to require 
> that. It finds it, but still doesn't recognize my list defined in there. 
> When I use (provide), racket doesn't know (provide). 
> 
> how can I require another file to use its variable without (provide)? 

I recommend that you keep the Racket list in CC, so that you don't 
depend on just one person to help resolve your questions. 


It would be helpful to show what your programs look like now. I 
expected using 'provide' and 'require' to work to refer to variables 
in other modules. The Guide introduces them here: 

http://docs.racket-lang.org/guide/module-basics.html 

If you can show us what you're doing, we may be able to identify where 
the problem is coming from. 


____________________
  Racket Users list:
  http://lists.racket-lang.org/users
____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to