Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I shorten code this?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00314481
Message ID:
00314492
Views:
30
lnNbFields = AFields(laStruct, "MyTable")
llFound = .F.
lnI = 1

DO WHILE (lnI <= lnNbFields) AND NOT llFound
   llFound = Evaluate(laStruct[lnI, 1]) = "Y"
   lnI = lnI + 1
ENDDO

IF llFound
   *-- Do whatever
ENDIF
HTH
>I am looking for a shortcut way to do this.
>Thanks in advance and then some.
>
>IF mytable.my_field1 = "Y" OR ;
> mytable.my_field2 = "Y" OR ;
> mytable.my_field3 = "Y" OR ;
> mytable.my_field4 = "Y" OR ;
> mytable.my_field5 = "Y" OR ;
> ...(do whatever)
>ENDIF
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform