Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: fun with for loops

From: chalz:earthlink at: 2-Aug-2002 12:58

> 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 like: > <snip> > or maybe use something like: > <snip>
Thanks, for the thousandth time, to everyone who's responded. I will be taking all of your suggestions into consideration. Er, that sounds like the response to a job application. What I mean is, I've spent the past, hm, 6 years working in this one language which is rather C-like, but it's not C - it's an interpreted language in a specific development environment. In it, I could do things like: <pseudocode> for line in text { if blank line { continue; // makes the for loop go to the next line } everything else } So, I could use 'break' to cancel the for entirely, or use 'continue' to just skip on by. I have come into the habit of frequently using if blocks at the beginning of functions to test various conditions for which other blocks of code should be ignored. Ie, if the line is blank, skip it all. Further down, it checks if the line is commented; skip everything else, then. Otherwise, do everything else. I think that Gabriele's idea of setting up another function is what I will most likely have to do. Oh well - that main function was getting awful hefty anyways ;) Thanks folks. --Charles