Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Divide variable into parts
Message
De
09/02/2008 12:47:07
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
09/02/2008 12:34:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01266627
Message ID:
01291074
Vues:
8
>>>Dragan gave you a solution.
>>
>>Which I don't really like. Not at all - it creates 15 variables for no good reason. And then there needs to be code which will use these variables, which will also have to check for their existence first. Ugly, and unnecessarily complicated.
>>
>>>But I will repeat that an array is easier and "cleaner". With my earlier code var(1) is '3', var(2) is '1' and so on.
>>
>>Sure is... and reading that this is for a report, I smell a kludge. But I was also too tired/lazy to recheck the whole thread, so I let it go as is. I had some deja vu, though - sounds like we've been through this once before. But we all get those often, no big deal.
>what would be wrong with
>
>
>x=[123456789ABCDEF]
>for I = 1 to len(m.x)
>?substr(x,m.iI,1)
>endFOR
>
>
Tariq wanted them in variables - so I wrote a way to get them into variables. The usual "why the {insert netherworld of your choice} would you need that" is not a polite question. It's a solution I don't like, but it's a solution.

Meanwhile I have re-read whole thread and it does look like other solutions were proposed, but Tariq probably has his own reasons why he needs var1, var2 etc.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform