Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional statements 1

Status
Not open for further replies.

mmerlinn

Programmer
May 20, 2005
745
US
[ ]
I have the following bit of cut & pasted code I am using. It works well. However to my way of thinking it is convoluted. Is there a better way of doing this?

[blue]
IF ALLTRIM(m.tablename) $ z
ELSE
DELETE TAG ALL
z = z + ALLTRIM(m.tablename) + ','
ENDIF
[/blue]


I know that I could do this, but to me it is no improvement:

[blue]
DO CASE
CASE ALLTRIM(m.tablename) $ z
OTHERWISE
DELETE TAG ALL
z = z + ALLTRIM(m.tablename) + ','
ENDCASE
[/blue]



mmerlinn


"We've found by experience that people who are careless and sloppy writers are usually also careless and sloppy at thinking and coding. Answering questions for careless and sloppy thinkers is not rewarding." - Eric Steven Raymond
 
Mmerlin,

are you saying in foxpro 2.6 there doesn't exist the NOT operator or the !-Operator?

Bye,Olaf.
 
Maybe for you it is convoluted, but for computer any problem!!! It is important that it works well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top