I think that Alines has always been this way, and it does create a discrepency.
lcC = "a" + ccCRLF + "b" + ccCRLF + "c" + ccCRLF + ""
with Memlines(), you get four
with alines(), you get three
This has bitten me good on a couple of equations. Upgrade my code to use alines() and suddenly my app starts throwing run time errors because it attempts to access beyond end of the array when last fragment in original line is empty
>Hi to all,
>
>Here's a piece of code that shows a puzzling result, at least puzzling for me. A FOUR LINES string is copied to an array by ALines(). However, the array length is only 3! This happens if the last 'line' is empty.
>
>The documentation doesn't mention any special handling of a last empty line. Is this a bug? If it is, then I'll send a report to the VFPteam.
>
>
>#define ccCRLF chr( 13 ) + chr( 10 )
>
>local lcC
>local array laLine[1]
>
>lcC = "a" + ccCRLF + "b" + ccCRLF + "c" + ccCRLF + ""
>
>? lcC + "<"
>? alines( laLine, lcC )
>list memo like laLine
>