[Gambas-user] why this could not be? error in runtime?

Fernando Cabral fernandojosecabral at ...626...
Fri Jul 28 23:17:13 CEST 2017


2017-07-28 17:55 GMT-03:00 PICCORO McKAY Lenz <mckaygerhard at ...626...>:

> in the following code:
>
>     strinchar = Mid(strinchar, 1, InStr(strinchar, ")", -1) - 1)
>
> What does inStr() returns if nothing is found? You may be passing an
invalid argument to Mid().
Please, check it up.

- fernando

> IDE said error invalid argument, but if i do:
>
>     psotionlen = InStr(strinchar, ")", -1) - 1
>      strinchar = Mid(strinchar, 1, psotionlen)
>
> works, why?
>
> i wnat to remove the last occurence of a char but bybass some possible
> spaces/chars at the end of string
>
> Lenz McKAY Gerardo (PICCORO)
> http://qgqlochekone.blogspot.com
> ------------------------------------------------------------
> ------------------
> 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
>



-- 
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
e-mail: fernandojosecabral at ...626...
Facebook: f at ...3654...
Telegram: +55 (37) 99988-8868
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868
Skype:  fernandojosecabral
Telefone fixo: +55 (37) 3521-2183
Telefone celular: +55 (37) 99988-8868

Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.



More information about the User mailing list