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

2017-07-29 Thread Christof Thalhofer
Am 28.07.2017 um 22:55 schrieb PICCORO McKAY Lenz: > in the following code: > > strinchar = Mid(strinchar, 1, InStr(strinchar, ")", -1) - 1) > > IDE said error invalid argument, but if i do: No, the IDE says nothing: Public Sub Test() Dim strinchar As String Dim psotionlen As Integer

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

2017-07-29 Thread Matti
YOU complainig-shouting about a typo! Am 29.07.2017 um 05:53 schrieb PICCORO McKAY Lenz: HEY TONY; ITS PICCORO; NOT PICARO! GR in the playground wprks perfectly, i not have 3.10, but in the job i have 3.1 and at my home 3.5 its a bug in 3.9 and 3.8, *with 3.1 works perfectly in debian

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

2017-07-28 Thread PICCORO McKAY Lenz
i not at the depot, and in my work i have gambas 3.1 (wheeze/squeeze), the "rare" behaviour are at the depot of my work with gambas 3.9 but as adrien said: works in playgroud and works at my home in gambas 3.1, in few hours i go to the depot and paste the code.. Lenz McKAY Gerardo (PICCORO)

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

2017-07-28 Thread Tony Morehen
Sorry about that, What strings are you using? What output do you want? For example: fn("(foo)") do you want "(foo)" or "(foo" yours returns "(foo" fn("(foo)x") do you want "(foo)" or "(foo" yours returns "(foo" fn("(foo)xx") do you want "(foo)" or "(foo" or "(foo)x" yours returns "(foo)x"

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

2017-07-28 Thread PICCORO McKAY Lenz
HEY TONY; ITS PICCORO; NOT PICARO! GR in the playground wprks perfectly, i not have 3.10, but in the job i have 3.1 and at my home 3.5 its a bug in 3.9 and 3.8, *with 3.1 works perfectly in debian squeeze (very older but better)* 2017-07-28 21:02 GMT-04:00 Adrien Prokopowicz

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

2017-07-28 Thread Tony Morehen
It's difficult to say for sure what's happening without Piccaro's test strings. However, 2 things do come to mind. First, according to Gambas doc, InStr(strinchar, ")", -n) does a left to right search for ")", starting at -n characters from the end of strinchar. So if Instr doesn't find

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

2017-07-28 Thread Fernando Cabral
Piccoro, sorry for my previous information. Something was missing. In fact, both versions work the same: * strinchar = "test )after)r"positionlen = (InStr(strinchar, ")", -1) - 1)Print strincharPrint positionlenstrinchar = Mid(strinchar, 1, positionlen) Print

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

2017-07-28 Thread Fernando Cabral
2017-07-28 20:46 GMT-03:00 PICCORO McKAY Lenz : > 2017-07-28 17:17 GMT-04:00 Fernando Cabral : > >> > in the following code: >> > strinchar = Mid(strinchar, 1, InStr(strinchar, ")", -1) - 1) >> > What does inStr() returns if nothing is

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

2017-07-28 Thread Adrien Prokopowicz
Le Sat, 29 Jul 2017 02:40:44 +0200, Jussi Lahtinen a écrit: No... again. My initial mail was correct. It should be: strinchar = Mid(strinchar, 1, (InStr(strinchar, ")", -1) - 1)) But the IDE makes highlighting bug with the brackets. Jussi On Sat, Jul 29, 2017

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

2017-07-28 Thread Jussi Lahtinen
No... again. My initial mail was correct. It should be: strinchar = Mid(strinchar, 1, (InStr(strinchar, ")", -1) - 1)) But the IDE makes highlighting bug with the brackets. Jussi On Sat, Jul 29, 2017 at 3:33 AM, Jussi Lahtinen wrote: > Hmmm... sorry, no mistake... I

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

2017-07-28 Thread Jussi Lahtinen
Hmmm... sorry, no mistake... I will look closer. Jussi On Sat, Jul 29, 2017 at 3:33 AM, Jussi Lahtinen wrote: > Because the line makes no sense at all. Try to remove ")". > > > Jussi > > On Fri, Jul 28, 2017 at 11:55 PM, PICCORO McKAY Lenz < > mckaygerh...@gmail.com>

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

2017-07-28 Thread Jussi Lahtinen
Because the line makes no sense at all. Try to remove ")". Jussi On Fri, Jul 28, 2017 at 11:55 PM, PICCORO McKAY Lenz wrote: > in the following code: > > strinchar = Mid(strinchar, 1, InStr(strinchar, ")", -1) - 1) > > IDE said error invalid argument, but if i do:

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

2017-07-28 Thread PICCORO McKAY Lenz
2017-07-28 17:17 GMT-04:00 Fernando Cabral : > > 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

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

2017-07-28 Thread Fernando Cabral
2017-07-28 17:55 GMT-03:00 PICCORO McKAY Lenz : > 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. -

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

2017-07-28 Thread PICCORO McKAY Lenz
in the following code: strinchar = Mid(strinchar, 1, InStr(strinchar, ")", -1) - 1) 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