Set var vTest TEXT = ' ' Set var vSlen integer = (SLEN(.vTest)) Sho var vSlen
This might give you a clue as to what is happening. > -----Original Message----- > From: [email protected] [mailto:[email protected]] On Behalf Of Hodges, > Dennis > Sent: Thursday, June 26, 2014 12:41 PM > To: RBASE-L Mailing List > Subject: [RBASE-L] - Re: Logic error on if statement > > I am running R:BASE eXtreme 9.5 (32) version 9.5.4.30626. > > Here’s some additional code and comments that should explain more > clearly. > > SET QUOTES=" > . > . > SET VARIABLE voerrorn TEXT =" " -- (single space) > SET VARIABLE voerrore TEXT =" " > SET VARIABLE voerrord TEXT =" " > . > . > IF (vousage > 23) AND (measure = "HR") THEN – (vousage = 1665 in my > test sample) > SET VARIABLE voerrore = "E" > ELSE > SET VARIABLE voerrore = " " > ENDIF > . > . > IF voerrore <> " " or voerrord <> " " or voerrorn <> " " THEN > INSERT INTO totalusage VALUES + > (.vocrew,.vodatex, .vocr_page, .vodotno, .vobegeqp, + > .voend1, .voend2, .voend3, .voend4, .vodnidle, .vousage, + > .voerrorn, .voerrore, .voerrord,.voeqpdesc) > ENDIF > ENDWHILE > DROP CURSOR c#1 > > Dennis Hodges > Maintenance Management Manager > FDOT Office of Maintenance MS #52 > PH: (850) 410-5635 > FAX: (850) 410-5511 > [email protected] > > Please note: e-mail may be subject to public disclosure. > > From: [email protected] [mailto:[email protected]] On Behalf Of Karen > Tellef > Sent: Thursday, June 26, 2014 11:42 AM > To: RBASE-L Mailing List > Subject: [RBASE-L] - Re: Logic error on if statement > > What do you mean by " "? Is there a physical space between those > quotes, or do you mean "IS NULL"? And if it is a physical space, yet > your null is set to " ", then there's another conflict. If you mean > null, then I would use the "IS NULL" in your if. > > Karen > > > > -----Original Message----- > From: Hodges, Dennis <[email protected]> > To: RBASE-L Mailing List <[email protected]> > Sent: Thu, Jun 26, 2014 10:40 am > Subject: [RBASE-L] - Logic error on if statement In the following code, > I know that the value of voerrore is “E”, voerrorn is “ “ and voerrord > is “ “. I have tried several different ways of expressing this (NE > instead of <>, using parens both for the entire if clause and each > condition separately). Everything I have tried causes a false > condition for the IF statement and jumps to the ENDWHILE. Can anyone > tell me what I am doing wrong or suggest another way of expressing > this? > IF voerrore <> " " or voerrord <> " " or voerrorn <> " " THEN > INSERT INTO totalusage VALUES + > (.vocrew,.vodatex, .vocr_page, .vodotno, .vobegeqp, + > .voend1, .voend2, .voend3, .voend4, .vodnidle, .vousage, + > .voerrorn, .voerrore, .voerrord,.voeqpdesc) > ENDIF > ENDWHILE > DROP CURSOR c#1 > > Dennis Hodges > Maintenance Management Manager > FDOT Office of Maintenance MS #52 > PH: (850) 410-5635 > FAX: (850) 410-5511 > [email protected] > > Please note: e-mail may be subject to public disclosure. >

