Op Fri, 4 Apr 2008 10:45:33 -0700 (PDT) schreef m_l_g3:
> On Apr 3, 3:16 am, George Hubert <georgeahub...@[EMAIL PROTECTED]
> wrote:
>> On Apr 2, 10:44 pm, Alex McDonald <b...@[EMAIL PROTECTED]
> wrote:
>>
>>
>>
>>> On Apr 2, 8:17 am, m_l...@[EMAIL PROTECTED]
wrote:
>>
>>> > Historically, there has been the variable DPL acquiring its value as
a
>>> > side efect of number conversion.
>>
>>> > For example,
>>
>>> > 1000 \ single, dpl=-1
>>> > 1000. \ double, dpl=0
>>> > 10.00 \ double, dpl=2
>>
>>> > So,
>>> > 1) Why DPL is not in the standard?
>>> > 2) Why DPL is not in Win32Forth?
>>
>>> DP-LOCATION in Version 6 and prior, DPL in the STC version.
>>
>>> --
>>> Regards
>>> Alex McDonald
>>
>> In both cases they're VALUEs rather than a VARIABLE, so code
>> that uses them would be different.
>>
>> George Hubert
>
>
> So,
>
> ' dp-location >body constant DPL
>
> and a bug fix (for myself, in case I will need the code later)
>
>
>: x ( d -- xn ) dpl @[EMAIL PROTECTED]
1+ if drop then logscale dpl @[EMAIL PROTECTED]
0 max - dup abs
> 10^ swap 0< if /
> else * then ;
>
> The only thing to remember is that constants like 0 and 1 DO NOT
> modify DPL.
I don't define small constants like 0 and 1 ;-)
--
Coos
CHForth, 16 bit DOS applications
http://home.hccnet.nl/j.j.haak/forth.html


|
8 Posts in Topic:
|
m_l_g3@[EMAIL PROTECTED]
|
2008-04-02 00:17:49 |
|
Brad Eckert <nospaambr |
2008-04-02 06:00:36 |
|
Alex McDonald <blog@[E |
2008-04-02 14:44:25 |
|
George Hubert <georgea |
2008-04-02 16:16:22 |
|
m_l_g3 <m_l_g3@[EMAIL |
2008-04-04 10:45:33 |
|
Coos Haak <chforth@[EM |
2008-04-04 20:06:46 |
|
"Ed" <nospam |
2008-04-05 11:43:43 |
|
Albert van der Horst < |
2008-04-05 09:27:59 |
|