Re: IF / WHILE / FOR
- Posted by "Daniel Kluss" <xerox_irs at hotmail.com> Jun 12, 2004
- 428 views
Well I was mainly talking about "if" and "while", but the idea is having= =20 constants at the top a program, and changing them for different=20 test/purposes and having the program react appropriatly. I just didn't want bad speed cause of testing/not testing and leaving=20 testing code in place. example if DEBUGMODE then--if debugnumber is 0 then if dissappears do lots of junk end if --if debugnumber is 0 then forloop dissapears for i = 1 to DEBUGNUMBER do end for and while too Daniel >From: Pete Lomax <petelomax at blueyonder.co.uk> >Reply-To: EUforum at topica.com >To: EUforum at topica.com >Subject: Re: IF / WHILE / FOR >Date: Sat, 12 Jun 2004 01:32:35 +0100 > > >On Thu, 10 Jun 2004 16:25:33 -0700, Daniel Kluss ><xerox_irs at hotmail.com> wrote: > > > > >I remember hearing a while ago about "while 1 do" being omptimized=20 >somehow > >in euphoria, and was wondering if "if 1 then / if 0 then" or even "for "= =20 >are > >similarly optimized. > >I'm wondering if a bunch of "if <constant> then" 's can be done with no > >penalty in speed. > > >As it happens, I tested this the other week (as I've done just this on >my other, far from complete project [ask me privately, or on openEU, >not here]), and the penalty is there, on RDS Eu, albeit small. As Rob >said, this is on his todo list. > >However, I have to ask, what would you want optimised with a for loop? >I almost get it, but I'd like a real/believable example, since I >imagine that bothering to do this on a for loop might not be very >useful, since it is likely to be extremely rare. > >Regards, >Pete >PS Blueyonder (my ISP) is experiencing email problems nationwide at >the moment, which they seem to be having some difficulty addressing. > > > > =20 Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963