Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro Expansion
Message
From
09/01/2002 07:12:34
 
 
To
09/01/2002 06:42:01
John Marrone
Bloodstock Research Inc.
Lexington, Kentucky, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00602412
Message ID:
00602421
Views:
55
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform