Hey danny. That must not have come across right. I'll try a differnt way.<br><br>Try doing the following:<br><br>menu option language->choose language->plt->pretty big<br><br>type in some module:<br>(module test-lang (lib "
plt-pretty-big-text.ss" "lang")<br> (provide (all-defined))<br> (display "hi there!"))<br><br>click the green "run" button...<br><br>Nothing happens, cause your language isn't set as "(module ...)"
<br><br><br>Now, 90% of my code, must remain outside of modules. So open another tab, and type in another program:<br><br>(display "this is another program).<br><br>then do: <br>menu option language->choose language->plt->(module ...)
<br><br>click the green run button <br><br>module-language: only module expressions are allowed in:...<br><br>because it's not a module. the idea is that with some tabs having modules, and some tabs having .scm files, choosing the "(module ...)" drscheme language for just the tabs with module files would be nice, since it's a pain to set that on each reload.
<br><br><br>I doubt that<br><br>(module test-lang (lib "(module ...)" "lang")<br><br>would do anything usefull :)<br><br>Corey<br><br><div><span class="gmail_quote">On 1/17/07, <b class="gmail_sendername">
Danny Yoo</b> <<a href="mailto:dyoo@hkn.eecs.berkeley.edu">dyoo@hkn.eecs.berkeley.edu</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><br>On Wed, 17 Jan 2007, Danny Yoo wrote:<br><br>> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br>> (module test-lang (lib "plt-pretty-big.ss" "lang")<br>> (define (hypotenuse a b)
<br>> (sqr (+ (sqrt a) (sqrt b)))))<br>> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br><br>Hi Corey,<br><br>Oh good grief, that's not the definition of the hypotenuse function...<br>*grin* Sorry about that.
<br><br><br>But I wanted to add that if you have this as a file, you can then invoke<br>it by using REQUIRE. You'll also probably want to expose the contents of<br>the module to the outside world, which is done by using the PROVIDE form.
<br><br>So, for example:<br><br>########################################################################<br>dyoo@dyoo-desktop:~$ cat test-lang.ss<br>(module test-lang (lib "plt-pretty-big-text.ss" "lang")
<br><br> (provide (all-defined))<br><br> ;; hypotenuse: number number -> number<br> ;; Computes the hypotenuse of a right triangle with legs a and b.<br> (define (hypotenuse a b)<br> (local ((define a*2 (sqr a))
<br> (define b*2 (sqr b)))<br> (sqrt (+ a*2 b*2)))))<br><br><br>dyoo@dyoo-desktop:~$ mzscheme<br>Welcome to MzScheme v369.4 [3m], Copyright (c) 2004-2007 PLT Scheme Inc.<br>> (require "test-lang.ss
")<br>> (hypotenuse 3 4)<br>5<br>########################################################################<br><br><br>Finally, have you already seen these?<br><br> <a href="http://www.htus.org/Book/Staging/how-to-use-modules/">
http://www.htus.org/Book/Staging/how-to-use-modules/</a><br><br> <a href="http://hkn.eecs.berkeley.edu/~dyoo/plt/modules.text">http://hkn.eecs.berkeley.edu/~dyoo/plt/modules.text</a><br><br><br>Hope this helps!<br></blockquote>
</div><br><br clear="all"><br>-- <br>((lambda (y) (y y)) (lambda (y) (y y)))