-->
Page 2 of 2

Re: v1.15 issue For-Next

PostPosted: Wed Nov 04, 2015 6:17 pm
by xtal
your code extract eer form eerfh20
I want to extract 20 to change refresh count, I thru the e's in to test instr, I keep getting 0 not 2/3

Why the end after the code ??

using rfh without quotes , how would you use a var then ??

Re: v1.15 issue For-Next

PostPosted: Wed Nov 04, 2015 6:29 pm
by Mmiscool
using the quotes is proper form. Right ow the interpreter assumes if variable name has not been used yet that it is a string.

The below code also works.

Code: Select allmycommand = "eerfh20"
x = instr(mycommand,"rfh")
z = x + 3
y = mid(mycommand,x,z)
SERIALPRINTLN mycommand
SERIALPRINTLN x
serialprintln y
end

Re: v1.15 issue For-Next

PostPosted: Wed Nov 04, 2015 7:08 pm
by xtal
using eerfh20 for the data

I cannot extract the 20 x is always 0

Re: v1.15 issue For-Next

PostPosted: Wed Nov 04, 2015 9:14 pm
by Mmiscool
Uploaded a new build fixing problems in mid() left() and right() functions.

The below code seems to be working.

Code: Select allmycommand = "eerfh20"

[top]
cls
textbox mycommand
button "Submt" [myBranch]
wait

[myBranch]
x = instr(mycommand,"rfh")
x = x + len("rfh")
z = x + 2
y = mid(mycommand,x,z)
print y
wait