Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Datatype ???
Message
From
26/01/2000 13:07:28
 
 
To
26/01/2000 12:47:59
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00322685
Message ID:
00322981
Views:
31
>>>Nick,
>>>
>>>>>at least look semi-sane and extensible? (INLIST() can only have up to 24 values, it is not optimizable, but it's infinitely better than the original)
>>>
>>>>Or:
>>>>
>>>>IIF(alltrim(t.transs) $ "~CS~DV~L~R~RC~RD~V~ST~OP~", 1, -1)
>>>>this one is not limited to 24 values.
>>>>
>>>>(You may use IIF("~" + alltrim(t.transs) + "~" $... so it does not mix up R and RC and RD codes). You would not need alltrim() if all codes could be 2 char in length (along with the code field).
>>>
>>>your solution is not optimizable, INLIST is (As opposed as Ed suggested), so INLIST would be prefferable.
>>>
>>
>>Or do it the way I came up with so it's readable, optimizable, extensible and not limited to 24 items.
>
>I agree this is probably the best way, but I think it could have a performance penalty because now you have to deal with more than 1 table.
>

ROFL! Compared to an IIF() and an INLIST() per line (hey, might as well ridicule my own code for being dumb!)? I can make an index? Rushmore still does bitmap matching? I am gonna have a tiny list of values...I am going to laught for hours, because the .003 seconds that might get saved on execution, comes back the first time I have to maintain this piece of code by 100,000 fold. In fact, more like 1*10^(pick a large number), I'm never going to have to touch this code, even if the multipliers change...

Think for a billionth of a second about this. Apply neurochemical energy to the problem. You've gotta be kidding!!!!!!! Solve it once and never touch it again sounds right to me.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform