Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Number of elements in array
Message
From
09/01/2004 09:59:42
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00865421
Message ID:
00865432
Views:
13
>Hi
>
>I am parsing an array - for some reason memlines() reports 30 lines when a display of the array shows only 20
>
>How can I determine how many elements there are in an array?
>
>Thanks

Colin,
If I guess right you're comparing memlines() return value to alines() return value on the same string or memo, right ?
If so memlines is dependant to current memowidth setting and might show more than actual line count (where a line ends with CR,LF or CRLF).
ie:
lcLine = replicate('hello ',1024)
lnMemoWidth = Set('Memowidth')
? memlines(m.lcLine), alines(aDummy,m.lcLine)
Set memowidth to 1024
? memlines(m.lcLine), alines(aDummy,m.lcLine)
Set memowidth to 512
? memlines(m.lcLine), alines(aDummy,m.lcLine)
Set memowidth to m.lnMemoWidth
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform