[REBOL] Re: fun with for loops

2002-08-02 Thread AR
How about this while [ it is true ] [ catch [ if condition1 [ do something throw ] if condition2 [ do it too throw ] do something else ] ] or just use switch as it is mostly suitable. AR Anton

[REBOL] Re: fun with for loops

2002-08-02 Thread Gabriele Santilli
Hi Charles, On Friday, August 02, 2002, 4:24:21 AM, you wrote: C either condition? [ C if true do this C ][ C if false C do these C next 20 lines C all indented C with more indentation C yet to come C very long lines C ] Is really indentation such a big problem?

[REBOL] Re: fun with for loops

2002-08-02 Thread Gregg Irwin
Hi Charles, Using ; as an example for comment lines, but writing a COMMENT? function might be a good idea. b: [ data ;Comment data 2 data 3] == [ data ;Comment data 2 data 3] foreach item b [ [if all [(not empty? item) (#; item/1)][ [print item [] []

[REBOL] Re: fun with for loops

2002-08-02 Thread Charles
Is really indentation such a big problem? Yeah, for me, anyways. Further down, I'm nested some 6 times, and that's leaving a ton of white space and extraneous scrolling past the edge. For readability, I always indent whenever a new block is opened. Anyway, I think you could do something

[REBOL] Re: fun with for loops

2002-08-01 Thread Anton
A trick I've used for continue is to break out of a loop, like this: for ... [ loop [ if condition [break] ; simulate continue ; other code ] ] Anton. Howdy folks. Got a bit of a difficulty

[REBOL] Re: fun with for loops

2002-08-01 Thread Anton
Whoops, I missed an argument to 'loop: for ... [ loop 1 [ ; only once if condition [break] ; other code ] ] Anton. -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with