Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Missing operand (apparently)
Message
From
31/12/2006 19:51:59
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
31/12/2006 15:10:33
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01181122
Message ID:
01181152
Views:
10
>When I test this bit of code, I get a 'missing operand' error.
>I can't see it. Can you?
>
>
>Count to JanCount for Alltrim(Crimetype) = "B&E Garage" and Month(CrimeDate)= 1 ;
>or Alltrim(Crimetype)= "B&E Home" and Month(CrimeDate)= 1 ;
>or Alltrim(Crimetype)= "Home invasion" and Month(CrimeDate)= 1 ;
>or Alltrim(Crimetype)= "B&E Business" and Month(CrimeDate)= 1 ;
>or Alltrim(Crimetype)= "B&E Cabin" and Month(CrimeDate)= 1
>
Might you not simplify this as follows?
count to JanCount for inlist(AllTrim(CrimeType), "B&E Garage", "B&E Home", ...);
  and Month(CrimeDate) = 1)
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform