Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question about applying UCASE$ to INSTR commands
#1
...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."
Reply
#2
How do you mean?

This?:
Code:
a$ = UCASE$(a$)
b% = INSTR(a$, c$)

Please explain some more.
Reply
#3
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."
Reply
#4
That code works fine...I've never had any problems using INSTR with IF either.
Reply
#5
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.
Reply
#6
It should work, and it works Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)