Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replacement for USE/SELE table with IF...ELSE...ENDIF
Message
From
02/10/2007 12:29:24
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01257862
Message ID:
01257965
Views:
15
>>>>>That's fine, but it's just turning the code he (inexplicably) wants to replace with a function that has teh same code.
>>>>
>>>>Oh, I don't think so. How many times do you want to code the IIF statement with all the brackets and quotes vs passing a table name to a function? I think the function route is quicker, cleaner and less susceptible to "fat fingering" the keyboard.<g>
>>>
>>>Agreed. No, I'm not decrying the usefulness or sense of the func. But it's just the same code as Jay wanted to avoid, preferring a one-liner for some magic reason.
>>
>>Bit fiesty today, Terry. Does it matter why I want it? Maybe I just want to see if it can be done.
>>
>>I actually like the function idea because it let's me use one line of simplified code in all the different places I would need it, with the working code in the function. John made a good point about it being cleaner. I was thinking that it could be done without a function, but perhaps not.
>
>Nah, there's nowt feisty about me today. I was just curious as to why one might require such a one-line concise piece of code, for the reasons of readibility etc. that I gave before. I can understand its usefulnes if, say, it needed to be put in a one-line report expression or SQL expression (like IIF() often is), but that ain't the case here. I can well understand your just wanting it for curiosity's sake though :-)
>
>Still, has anyone found a one-liner yet that actually works? Was my appraisal of the accepted solution wrong?
>
>'sall gone quiet.

Haven't had a chance to try it - working on trapping ACK codes returned from the Server. I'm using Tore's code right now, but I will test Walter's when I can.
Previous
Reply
Map
View

Click here to load this message in the networking platform