Show
Ignore:
Timestamp:
02/10/08 23:53:46 (9 months ago)
Author:
krobillard
Message:

'loop is now an opcode and can act as loop.to for integers.
File port! read now handles optional limit.
console.out now handles binary!.
Can now 'make an int! from first 4 bytes of a binary!
Added ur_initDecimal macro.
Added 'fcalc.
Removed word inc/dec.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/thune/doc/UserManual

    r509 r510  
    364364either    (logic t-val f-val -- )    Evaluate either t-val or f-val. 
    365365forever   (block -- )                Evaluate block until exception thrown. 
     366loop_     (block n -- )              Repeat block **n** times. 
     367loop_     (block n limit -- )        Repeat block **n** to **limit** times. 
    366368iter      (ser body -- )             Iterate over series. 
    367369iter/N    (ser body -- )             Iterate over series with skip. 
     
    393395each.set  (ser words body -- )       Iterate over series and assign elements. 
    394396while     (body cond -- )            Evaluate body while cond is true. 
    395 loop      (block n -- )              Repeat block **n** times. 
    396397loop.to   (block n limit -- )        Repeat block **n** to **limit** times. 
    397398proc.env  (env body -- proc)         Create procedure with private context. 
     
    632633 
    633634 
     635loop 
     636---- 
     637:: 
     638 
     639    (block int -- ) 
     640    (block int int -- ) 
     641 
     642The first form simply evalutes the body block a given number of times. 
     643 
     644The second form pushes the counter value onto the stack before each loop, 
     645and stops when the limit is reached. 
     646 
     647Example:: 
     648 
     649    )> [.] -2 2 loop 
     650    -2 
     651    -1 
     652    0 
     653    1 
     654 
    634655 
    635656Data Manipulation Functions