General information
Category:
Coding, syntax & commands
>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.
Actually, I'd expect it to return 1. lcTitle is not empty, it contains 1 empty string.
What's more interesting is that if lcTitle contains "" + Chr(10) + "", the return is still 1, which intuitively seems wrong, but on looking at it longer, makes sense since the line feed becomes the 1st character (ie line 1). Similarly, you get back 2 if lcTitle is "" + chr(10) + "" + chr(10) + "".
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only