Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Weird Problem with Evaluating
Message
From
27/10/2004 16:19:10
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Weird Problem with Evaluating
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00955005
Message ID:
00955005
Views:
61
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
Map
View

Click here to load this message in the networking platform