[plt-scheme] A question about using the ellipsis as a temporary substitute for the program body (among other things).

From: Lou Oswald Meneses (oswald.meneses at gmail.com)
Date: Tue Mar 13 05:13:02 EDT 2007

Daniel Yoo wrote:
>
>
> On Mon, 12 Mar 2007, Lou Oswald Meneses wrote:
>
>> Hi! I am using Dr. Scheme set to Beginning Student and I'm wondering 
>> why using the three dots for the purpose I described in the title, as 
>> suggested in "How to Design Programs", doesn't work.
>
>
> Hi Lou,
>
> I think what you mean is that you're seeing the error message:
>
>    ...: name is not defined, not an argument, and not a primitive name 
> in:
>        ...
>
> "..." is just a placeholder, so any program that contains it won't 
> execute or "Check Syntax" properly until '...' is replaced with 
> whatever it really should contain.
>
>
> What you can do, temporarily, is define '...' to some scratch value at 
> the top of your program.  For example:
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;
> (define ... "fill me in")
>
> ;; foo: number -> number
> ;;
> ;; Example of writing out a function template:
> (define (foo n)
>   (cond
>     [(zero? n) ...]
>     [else ...]))
> ;;;;;;;;;;;;;;;;;;;;;;;;;
>
> Here, we define "..." to stand for the string value "fill me in".
>
>
>
>> I did a quick search at the Help Desk, looked around the preferences, 
>> reduced the dots from three all the way to one and even changed the 
>> dots to asterisks but, obviously, nothing worked. This seems like a 
>> very important feature and I'd be glad to know of any way to use it.
>
> Just to mention: normally, this feature is a good thing, because it'll 
> let you catch typos quickly.
>
>
> Best of wishes!
>

Wow, thanks a lot for all the (quick) help!

The error message is correct. I was originally thinking of using this as 
a placeholder for incomplete functions which are to be used in other 
functions and then, running them to check for errors. I've watched a few 
of the downloadable video lectures by Sussman and Abelson and they kept 
emphasizing the "wishful thinking" concept and this is how I assumed it 
should be done. That and I may have also misinterpreted the meaning in a 
part in "How to Design Programs" where it mentions that /"Three dots in 
a row, |...|, is a legal Scheme name. DrScheme does not attempt to 
determine the meaning of a name until necessary"/ (in section 3.3). 
Thinking about it now, it was silly of me. Thanks again!

P.S. Also, I think I'm going follow John's advice for now but thanks 
anyway to Daniel.
   


Posted on the users mailing list.