home .. forth .. colorforth mail list archive ..

Re: [colorforth] Euler Project Problems.


On Mon, May 19, 2008 at 11:59 PM, Ray St. Marie <ray.stmarie@xxxxxxxxx> wrote:
> Dear Albert,

> : READ.DECIMAL.NUMBER           \ ( --- >> "number.string" )
>     1 TO PRECISION             \ Reset precision
>     BL WORD                    \ get from input
>     COUNT                      \ String.address length
>     DUP 0= ABORT" Please input a number"
>     DUP length !               \ Remember!
>     0 DO                       \  Convert each digit

****************************************************************

I see from the Dutch version that C@+ is defined as COUNT

: C@+ ( addres -- addres+1 byte ) COUNT ;


>          C@ dup . \ C@+ is this a typing error? RAS 080519
>          ASCII->BINARY
>          I num digit!          \  to binary in number.
>     LOOP DROP                  \  Drop string address.
>     10 current.base digit!     \ Start with decimal
>     0 current.base CELL+ !     \ Guard decimal for the overflow
> ;

I keep refering to the Dutch document, trying what you have there in
the ANS file. I have to ask, was either of these programs ever tested
in an ANS environment? I realize your answer is yes, but I'm
frustrated and can't seem to get it to do what you say it does.

Ray


-- 
Raymond St. Marie ii,
colorforthray.info

---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com