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
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
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)
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"
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
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
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
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
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
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
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>
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:
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
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.
-
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
15 matches
Mail list logo