Subject: Re: Weird OF problem
To: gabriel rosenkoetter <gr@eclipsed.net>
From: Cliff Crawford <cjc26@cornell.edu>
List: port-macppc
Date: 11/05/1999 12:28:05
On Fri, 5 Nov 1999, gabriel rosenkoetter wrote:

| > a @ b !
| > This would be the equivalent of a=b in C.
| > a @ gets the value of a and puts it on the stack, and b ! takes the topmost
| > stack element and stores it in b.
| 
| Would that not then be the equivalent of:
| 
| b = a;
| 
| in C?
| 
| (This may seem minor, but it's a pretty big deal...)

Ooops!  You're right.
Ok, so it's not easy to switch from postfix to infix in the same paragraph :)


| > I don't know if this will work in OF though, it seems they've taken a few
| > liberties with the language (for instance you say "setenv auto-boot? false"
| > instead of something like "false setenv auto-boot?" or "false auto-boot? setenv")
| 
| mmmm... postfix.
| 
| They probably just did the high level stuff like that for easy of use,
| standard Forth commands might still work. (Then again, I haven't
| tried.)
| 
| While we're on the subject of boot scripts, is there a command to make
| the machine wait a bit? (Equivalent to sleep().) I have my box
| auto-booting, but OF wants to boot before the SCSI drive has spun up,
| and it fails, so I have to come and nurse the console every time
| there's a power outtage longer than my UPS lasts.

Maybe try a do loop?

: pause  0 do loop ;

10000 pause

That will probably go pretty quick though.  You might want to stick a
"i i * drop" (or something similar) in the loop to slow it down:

: pause  0 do i i * drop loop ;


-- 
cliff crawford   http://www.people.cornell.edu/pages/cjc26/
-><-                        Shall she hear the lion's roar?