General information
Category:
Coding, syntax & commands
Title:
Weird Problem with Evaluating
My co-worker came to me with a weird problem. He has some code that should blow up, but is running and I can not explain it.
He has a Department field in table Depts. In this case, Depts.Department="A"
He has a field that indicates if a department should print or not. In this case, it's NOPRINT and NOPRINT = .F.
His statement is in a loop and it looks like this:
IF ALLTRIM(depts.Department) == NOPRINT
SKIP
ENDIF
If you are in the debugger, the program breezes right past the IF and it evaluates to TRUE, effectively skipping the record.
"A"==.F. should give an error.
In the watch window, the same expression - ALLTRIM(depts.Department) == NOPRINT - shows up as an error. There isn't any ON ERROR set either. The same expression in the command window returns an error.
Is there any reason why the program would evaluate the illegal expression to TRUE?
Thanks,
Tim
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only