I'm not quite sure why i am having so much trouble getting this. It is my first time creating a program this complicated but it doesn't seem like it should be so difficult...
Here is what I have so far.
It seems to work fine the first loop around but then every other entry gives "was not found" and "IF LEN(STATE) = 0 THEN EXIT DO" seems to not work either. Any ideas? I'm sure it is something simple that I am missing here..
SHARED states() AS STRING
DIM STATE AS STRING
DIM x AS INTEGER
DIM found AS INTEGER
INPUT "Enter State: (blank to exit) "; STATE
IF LEN(STATE) = 0 THEN EXIT DO
found = 0
FOR x = 0 TO maxstates - 1
IF UCASE$(STATE) = UCASE$(states(x)) THEN
found = 1
states(x) = ""
PRINT STATE; " was found and deleted.": EXIT DO
ELSEIF found = 0 THEN
PRINT STATE; " was not found in the array.": EXIT DO