Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ALINES() behavior
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00830644
Message ID:
00830691
Views:
25
>>>Hi all,
>>>
>>>Is this a normal behavior of ALINES() in VFP7?
>>>
>>>dimension aX[1,2] && two-dime array!
>>>cX = ''
>>>cX = cX + 'hello:world'
>>>cX = cX + 'how:are'
>>>cX = cX + 'you?:'
>>>alines(aX,cX,.t.,':')
>>>* i was expecting something like this
>>>* aX[1,1] = 'hello'
>>>* aX[1,2] = 'world'
>>>* aX[2,1] = 'how'
>>>* aX[2,2] = 'are'
>>>* aX[3,1] = 'you?'
>>>* aX[3,2] = .f.
>>>* instead, i get this, a single-dime array!!!
>>>* aX[1] = 'hello'
>>>* aX[2] = 'world'
>>>* aX[3] = 'how'
>>>* aX[4] = 'are'
>>>...
>>>
>>
>>I don't see this in 7.0 or 8.0. I get what I expect. First, however, ALINES() is supposed to return a one dimensional array. What I get, and would expect from the above, is
* aX[1] = "hello"
>>* aX[2] = "worldhow"
>>* aX[3] = "areyou?"
Are you including a carriage return/line feed as well as what you've described above?
>
>Thank you George.
>
>I forgot to add the extra ":" in this code snippet. However, you answered my inquiry that ALINES() will return a one dimensional array even though the array passed was initialized as a two-dimensional array.

You're welcome. I thought that might be it.

Give Cetin some credit too for showing how to make it a two dimensional array. From the text of your post, it appears that it's a need.< s >
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform