RE: shared memory
- Posted by mistertrik at hotmail.com Jul 25, 2002
- 413 views
Ok, each to their own. I've never had problem with large elsif statements as long as they're indented correctly, and EE does that automagically for me, as well as putting the 'end if' in. If I write set of elsif clauses with especially large contents, or it seems that the elsif statements may be confusing, I'll either put a double indent on anything inside, so it's easier to see, or put a comment label at the top of each branch, so I see it when scrolling past. ===================================================== Besides, goto is evil :P (j/k) .______<-------------------\__ / _____<--------------------__|=== ||_ <-------------------/ \__| Mr Trick >From: Kat <gertie at PELL.NET> >Reply-To: EUforum at topica.com >To: EUforum <EUforum at topica.com> >Subject: RE: shared memory >Date: Thu, 25 Jul 2002 21:42:13 -0500 > > >On 26 Jul 2002, at 12:02, mistertrik at hotmail.com wrote: > > > > > Either way, if Kat is against long elsif statements, it can be >structured as > > > > procedure proc_a() > > --stuff > > end procedure > > > > procedure proc_b() > > --stuff > > end procedure > > > > procedure proc_c() > > --stuff > > end procedure > > > > if (a) then > > proc_a() > > elsif (b) > > proc_b() > > else > > proc_c() > > end if > > > > :P > > > > The only time I ever missed goto statements was when I first switched >from basic > > to euphoria.... and that was only becuase I didn't know there was such >thing as > > an elsif statement. > >I knew about elsif before i found Eu. I have 240 elsif, and 30 local vars, >i don't >want to make the vars global so those extra procedures can get to them. In >addition,, rather than testing thru a huge stack of elsif, it's faster to >know >where in the program all the targets are, and goto the contents of the var, >like >this: > >-- var can be 001 to 620 >procedure numeric(integer var) >goto var >:001: >-- process >goto end >:001: >-- process >goto end >..... >:620: >-- process > >:end: >end procedure -- numeric > >Kat > > > >