Re: [Flashforth-devel] For-next loops - the New Design
Brought to you by:
oh2aun
From: Herman A. <exp...@vn...> - 2015-05-28 15:21:11
|
I think the best solution of the n for ... next cycle, witch run n-times, including n=0, as it is in the FF now. This principle incopatible to cover the for full 16-bit range. To rich the full 16bit range must be defined an other for-next like cycle, with different approach. In this case the goal is not to makes n count, but to cover a non-zero long range. The cycle must run n to 0, including n and 0. The 'next' decrements after testing for zero. We need only to find the appropriate word-names. Because it is mostly usable for memory addressing, maybe mfor-mnext. n mfor r@ u. mnext ---> n ... 0 0 mfor r@ u. mnext ---> 0 5 mfor r@ u. mnext ---> 5 4 3 2 1 0 65535 mfor r@ u. mnext ---> 65535 65534 ... 1 0 BR Attila |