Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Macro Expansion
Message
De
09/01/2002 07:12:34
 
 
À
09/01/2002 06:42:01
John Marrone
Bloodstock Research Inc.
Lexington, Kentucky, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00602412
Message ID:
00602421
Vues:
53
>Hi
> I have a variable which holds lets say this >
>[20010212],[aqu],1,1,,,[wse],,2 < the brackets are really double quotes. I have
>used fgets() to read in this to a var lets call vcStr and I have an array
>called aAr deminsion aAr[1435]. In clipper I could assign values to an array
>like this:
>
>aAr = { [20010212],[aqu],1,1,,,[wse],,2 }
>
>and I could build a string holding this
>
>vcStr = [{ [20010212],[aqu],1,1,,,[wse],,2 } ]
>
>and then do somrthing like this:
>
>aAr = &(vcStr)
>
>
>I cann't get this to work in vfp. I tried using ALines but the lines are
>to big. Each record has 1435 fields in it. This worked in clipper years ago.
>Use fgets() to read in 1 record, then attach a curly brocket to each end and then
>do the macro expansion ->
>
>aAr = &(vcStr)
>
>
>Can somebody help.
>Thanks

Would it not be possible to use strtran & alines (I'm not sure what you mean about the lines to big for alines).
instr = "[20010212],[aqu],1,1,,,[wse],,2"
tmpstr = strtran( instr, ',', ' '+chr(10) )
alines( aAr, tmpstr, .T. )
convert the commas to space/new line - if the space isn't included alines ignores the consecutive new lines (i think). Using the .T. parameter strips any leading & trailing spaces of data in the array.
Len Speed
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform