Sorry guys, but neither of your 2 sollutions work, AND gives me expected end of statement errors, and Josh sollution give me errors somewhere else in my code. Could Select Case be my sollution ?
Thanks - Eric -----Original Message----- From: Josh G [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 02 October, 2002 8:47 To: ActiveServerPages Subject: Re: Lost in Time: If ... then AND? I didn't know that was an option. Anyway, it's a bad idea, it makes your code hard to read. If I see an AND in an if statement and it doesn't do what I expect it to (ie IF foo AND bar THEN...) it makes my life hard. The best way for readability would be: if x < 0 then a = "green" z=z+1 end if It gets the desired results, and the indenting makes things easier to follow. On a slightly related note, does "foo=bar : z=z=+1" work? It was a technique used to squeeze things on to one line in the golden days of basic :) -Josh -- And can you tell me doctor why I still can't get to sleep? And why the channel 7 chopper chills me to my feet? And what's this rash that comes and goes, can you tell me what it means? God help me, I was only 19 ----- Original Message ----- From: "Tsiris Alexandros" <[EMAIL PROTECTED]> To: "ActiveServerPages" <[EMAIL PROTECTED]> Sent: Wednesday, October 02, 2002 4:35 PM Subject: RE: Lost in Time: If ... then > > > > > Hi guys, > > > > i feel foolish now: > > > > I want to do more than 1 opperation in an if...then > > statement, for ex.: > > if x < 0 then a = "green", z=z+1 end if > > > > this fails on the , (expected end of statement) > > > > Any idea how i can get this to work? > > use AND > then a="green" and z=z+1 > > > Alexander > > --- > You are currently subscribed to activeserverpages as: [EMAIL PROTECTED] > To unsubscribe send a blank email to %%email.unsub%% > --- You are currently subscribed to activeserverpages as: [EMAIL PROTECTED] To unsubscribe send a blank email to %%email.unsub%% --- You are currently subscribed to activeserverpages as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED]
