Re: Changes to Euphoria

new topic     » goto parent     » topic index » view thread      » older message » newer message

Jeremy Cowgar wrote:

> for a = 1 to length(lines) do ....
> 
> Now you are evaluating the length of lines over and over and over again.
> Granted,
> length is stored in the sequence but some other calculation.

length(lines) is part of initialization.  Only an inexperienced coder would
put it inside the loop.  To be explicit...

LineLength=length(lines)
Loop
  if (a>LineLength) Exit
End Loop

Yes, we have an explicit var instead of an implicit one.  I don't have a
problem with that.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu