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

Matti matti.eber at ...3240...
Wed May 10 20:24:02 CEST 2017


Oh yes, oh yes!
Thank you, Jorge.
I always thought, Value could also be part of a string.

Am 10.05.2017 um 19:08 schrieb Jorge Carrión:
> Wiki says: "Returns the position of the first occurrence of Value in the
> array."
> You must search for a Value of the array.
>
> In your array there isn't a Value "Chr", that is what you search, so always
> returns -1
>
>
> Best Regars
>
> 2017-05-10 18:57 GMT+02:00 Matti <matti.eber at ...3240...>:
>
>> 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
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>




More information about the User mailing list