Posts: 10
Threads: 3
Joined: Dec 2003
...my question is, is it possible? I've tried various ways, but it ends up cancelling out the INSTR command because of the parentheses. Any help is appreciated.
To win a thousand battles is good, but to win one battle over the self is great."
Posts: 1,845
Threads: 44
Joined: Aug 2002
How do you mean?
This?:
Code:
a$ = UCASE$(a$)
b% = INSTR(a$, c$)
Please explain some more.
Posts: 10
Threads: 3
Joined: Dec 2003
I should have explained a bit better: sorry. I mean like this:
IF INSTR(UCASE$(hello$), "GOOD DAY") > 0 THEN
PRINT "A good day to you too, sir."
END IF
However, that doesn't work because it invalidates the IF statement.
I also find it impossible to do IF algorithms that contain INSTR commands... is there a reason for this?
To win a thousand battles is good, but to win one battle over the self is great."
Posts: 1,752
Threads: 21
Joined: Jun 2002
That code works fine...I've never had any problems using INSTR with IF either.
Posts: 2,771
Threads: 96
Joined: Oct 2003
Yea, that code should work perfectly....
Are you sure that you got the syntax right when you wrote it in your program? Quite often a problem is forgetting to put in one of the required values in the syntax of a line.
Posts: 1,845
Threads: 44
Joined: Aug 2002
It should work, and it works