| Re: Star Trek by Krishna Myneni |
|
 |
|
 |
|
 |
|
 |
Group: comp.lang.forth · Group Profile
Author: Doug HoffmanDoug Hoffman Date: Sep 20, 2008 06:14
Krishna Myneni wrote:
> Doug Hoffman wrote:
>> This might also be a problem:
>>
>>
>> fvariable x
>> ^^^^^^^^^^^
>>
>>
>> : FirePhasers ( -- )
>>
>> ...
>> cr ." NUMBER OF UNITS TO FIRE " #in X !
>> ^^^
>> e @ X @ - 0 >=
>> UNTIL
>>
>> X @ 0> IF
>> X @ negate e +!
>> d{ 7 } f@ f0< IF X @ s>f ran0 f* fround>s X ! THEN
>> X @ k3 @ / h1 ! \ distribute phaser energy among klingons present
>>
>> ( there may be more uses of @ and ! with x )
>>
>>
>>
>> -Doug
>
> This is not likely to be a problem as "x" is probably a temporary
> fvariable, and use of "@" and "!" will not cause memory problems.
What is a "temporary fvariable"? An flocal? Regardless, I don't see it
defined anywhere. X is the same as x , right?
Is #in a local declarer? If so when I try to use it as in strek it
clobbers the fvariable x. Example:
fvariable x
56e x f!
x f@ f.
56.000000 ok
: t #in X ! ;
t
6
x f@ f.
0.000000 \ <= ????
x @ .
6 ok
-Doug
|