[Gambas-user] String[].Find finds nothing

Matti matti.eber at ...3240...
Wed May 10 18:57:43 CEST 2017


I tried to search an array with the 'Find' function instead of 'For...Next' and 'InStr'.

The wiki says:
"String[].Find (gb)
Function Find ( Value As String [ , Mode As Integer, Start As Integer ] ) As Integer
Returns the position of the first occurrence of Value in the array.
If Value cannot be found, -1 is returned."

But I can do what I want, I always get '-1'. No positive result ever.

Attached is a tiny project that should show this behaviour.
Where is my mistake?
Thanks in advance
Matti

Gambas 3.9.2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FindString-0.0.1.tar.gz
Type: application/gzip
Size: 12440 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20170510/fd098528/attachment.gz>


More information about the User mailing list