Skip to content
Back to formatted view

Raw Message

Message-ID: <4DF0EF81.1010306@witthoft.com>
Date: 2011-06-09T16:06:25Z
From: Carl Witthoft
Subject: Problem with a if statement inside a function

I would start out by checking out ?switch  and getting rid of most of 
those "if"s .

Next: I apologize for the harshness of this, but your code really does 
qualify for http://thedailywtf.com .   Creating a zillion variables dXY, 
for example, is really poor programming practice.  Create a list or 
something.



And, this probably should be first:  you did not supply an example of 
what your input "lst" looks like, AND you didn't tell us what your 
expected result is, nor what the "unexpected result" was.  At the risk 
of speculating wildly, the fact that "lst" is defined inside the 
function would suggest there's something fundamentally wrong here.


Carl