Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FYI - alines() with blank string
Message
 
 
To
04/08/2006 09:02:53
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01142943
Message ID:
01142958
Views:
9
>>Hi everybody,
>>
>>lcTitle = ""
>>lnLines = alines(laLines, m.lcTitle)
>>
>>lnLines = 1
>>
>>I would expect it to return 0. Anyway, once I found this out I put a special handling for empty cases.
>
>Naomi,
>
>Try it like this,
>
>lcTitle = ""
>lnLine = ALINES(laLines,m.lcTitle,4)
>
>and it returns 0.
>
>Regards,

Let me check how would it work for "Line1" + CRLF + CRLF + "Line3". I want 3 in this case. It returns 2, so I would probably stick with my code for checking for empty string - special case.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform