> From: Steve Edwards <[EMAIL PROTECTED]> > > On Fri, 11 Jul 2008, Douglas Garstang wrote: > >> Ugh. Yes, the variables are local to the current channel. However, they >> are global to the entire dial plan within the current channel. I have >> stepped on myself many times because I've had a loop counter called $i >> for example, jumped somewhere else within that loop, reused the same >> variable name, $i, and screwed up my logic. > > Ugh indeed. While I sympathize with your local/global name space issues, > you lose credibility with your false economy. > > IMNSHO, anybody who uses a single [common] letter for a variable > deserves a bump in the temperature when they reach their final resting > place :) > > Surely you can come up with a name slightly more descriptive -- maybe > "idx?" > > Take pity on the next sod that has to plod through your dialplan. The > millisecond you "spend" typing a more meaningful name will be returned > to you (or your employer) a millionfold.
On Fri, 11 Jul 2008, Douglas Garstang wrote: > Fine, I'll call it ${LoopVariable} then... how's that going to fix the > problem? It (obviously) doesn't. It just "fixes" the next guy's problem when he tries to read your dialplan -- as stated above. I'm just suggesting "better practices." Even examples should demonstrate best practices because they form the basis of some coders only source of knowledge. Kind of like not "top posting" in a list where the posted "etiquette" is not top posting ;) Thanks in advance, ------------------------------------------------------------------------ Steve Edwards [EMAIL PROTECTED] Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000 _______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2008 - September 22 - 25 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users