We got it now, but some of us just got in this morning so as we're coming across the "problem", we're trying to help.
Chris ----- Original Message ----- From: "Van den Bossche Eric" <[EMAIL PROTECTED]> To: "ActiveServerPages" <[EMAIL PROTECTED]> Sent: Wednesday, October 02, 2002 5:46 AM Subject: RE: Lost in Time: If ... then SOLVED > Maybe i was not clear, but the problem is SOLVED > > -----Original Message----- > From: Van den Bossche Eric [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, 02 October, 2002 14:16 > To: ActiveServerPages > Subject: RE: Lost in Time: If ... then > > > Thanks for the tip Josh, > > The following code is working perfectly: > > if Coverday =< 0 then > bgcday="red" > days0=days0+1 > elseif CoverDay > 0 and CoverDay < 45 then > bgcday="#2068c0" > days045=days045+1 > elseif CoverDay >= 45 and CoverDay =< 60 then > bgcday="green" > days4560=days4560+1 > elseif CoverDay > 60 then > bgcday="yellow" > days60=days60+1 > end if > > Thanks to all - Eric > > -----Original Message----- > From: Josh G [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, 02 October, 2002 9:11 > To: ActiveServerPages > Subject: Re: Lost in Time: If ... then > > > there's your problem - in vb, you don't use else if, you need elseif. else > if is valid code, so you won't syntax error out, but it means something > different. > > if Coverday < 0 then > bgcday="red" and days0=days0+1 > elseif CoverDay > 0 and CoverDay < 45 then > bgcday="#2068c0" > days045=days045+1 > elseif CoverDay >= 45 and CoverDay =< 60 then > bgcday="green" > days4560=days4560+1 > elseif CoverDay > 60 then > bgcday="yellow" > days60=days60+1 > end if > > Your code may work, but you would need 4(?) "end if"s at the end, and it's > _very_ hard to read. In this case a select would have been a better idea. > > -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: "Van den Bossche Eric" <[EMAIL PROTECTED]> > To: "ActiveServerPages" <[EMAIL PROTECTED]> > Sent: Wednesday, October 02, 2002 5:10 PM > Subject: RE: Lost in Time: If ... then > > > > here is the original code, and it doesnt work: > > > > if Coverday < 0 then bgcday="red" and days0=days0+1 else > > if CoverDay > 0 and CoverDay < 45 then bgcday="#2068c0" and > > days045=days045+1 else > > if CoverDay >= 45 and CoverDay =< 60 then bgcday="green" and > > days4560=days4560+1 else > > if CoverDay > 60 then bgcday="yellow" and days60=days60+1 end if > > > > any suggestion > > > > -----Original Message----- > > From: Josh G [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, 02 October, 2002 9:02 > > To: ActiveServerPages > > Subject: Re: Lost in Time: If ... then > > > > > > If you say so. But one-line if statements don't need "end if" at the end, > > and I still say you've got problems with a loop / conditional somewhere > else > > in your code. > > > > -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: "Van den Bossche Eric" <[EMAIL PROTECTED]> > > To: "ActiveServerPages" <[EMAIL PROTECTED]> > > Sent: Wednesday, October 02, 2002 5:01 PM > > Subject: RE: Lost in Time: If ... then > > > > > > > Dude, don't think so. > > > > > > if x < 0 then > > > a = "green" > > > z=z+1 > > > end if > > > > > > gives me an error "unexpected next" way above these lines. > > > > > > If i use > > > > > > if x < 0 then a = "green" end if > > > > > > then everything is working fine. > > > > > > Eric > > > > > > -----Original Message----- > > > From: Josh G [mailto:[EMAIL PROTECTED]] > > > Sent: Wednesday, 02 October, 2002 8:54 > > > To: ActiveServerPages > > > Subject: Re: Lost in Time: If ... then > > > > > > > > > Dude, if my solution doesn't work, you have errors elsewhere in your > code > > > ;-) > > > > > > -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: "Van den Bossche Eric" <[EMAIL PROTECTED]> > > > To: "ActiveServerPages" <[EMAIL PROTECTED]> > > > Sent: Wednesday, October 02, 2002 4:55 PM > > > Subject: RE: Lost in Time: If ... then > > > > > > > > > > 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.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.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.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.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]
