I suppose it's just the way the parser works.  My guess would be that Emmit's 
example should have worked for you as it was.

In my tortured mind, the parens force the following to equivocate to comparing 
booleans, with each side of the AND syntatically like a single RBase comparison 
where the left side is UN dotted.

WHILE (finteger1 > 0) AND (finteger1 <= .finteger2) THEN

I get that when you encase the variable by itself in parens that the parser 
treats the variable like an expression that can only result in its own 
contents, as Dennis showed.



----- Original Message ----- 
From: "Charles Parks" <[EMAIL PROTECTED]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Tuesday, August 19, 2008 1:04 PM
Subject: [RBASE-L] - RE: [BULK] [RBASE-L] - RE: Integer as a condition in a 
while loop


This "WHILE finteger1 >= 0 AND .finteger1 <= .finteger2 THEN" does work.

Now, I'm curious, why is the first fInteger1 not dotted while the second is?



-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of MikeB
Posted At: Tuesday, August 19, 2008 11:51 AM
Posted To: RB7-L
Conversation: [BULK] [RBASE-L] - RE: Integer as a condition in a while loop
Subject: [BULK] [RBASE-L] - RE: Integer as a condition in a while loop
Importance: Low


Emmitt's solution will work...excepting I think the left side after the AND 
should be dotted.  Try it.

WHILE finteger1 >= 0 AND .finteger1 <= .finteger2 THEN

----- Original Message -----
From: "Charles Parks" <[EMAIL PROTECTED]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Tuesday, August 19, 2008 12:27 PM
Subject: [RBASE-L] - RE: Integer as a condition in a while loop


I have tried variations of these:
  WHILE fInteger1 BETWEEN 0 AND .fInteger2 THEN
  WHILE fInteger1 < .fInteger2 THEN
  WHILE fInteger1 > 0 and fInteger1 <= .fInteger2 THEN
And I get what seems like an endless while loop.

Something like this
  WHILE (ctxt(.fInteger1)) BETWEEN '0' AND (ctxt(.fInteger2)) THEN
Will cause the while loop to work correctly but that leaves the problem text
'2' is greater than text '10'.

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Emmitt Dove
Posted At: Tuesday, August 19, 2008 11:01 AM
Posted To: RB7-L
Conversation: [RBASE-L] - RE: Integer as a condition in a while loop
Subject: [RBASE-L] - RE: Integer as a condition in a while loop


Charlie,

Have you tried:

WHILE finteger1 > 0 AND finteger1 <= .finteger2 THEN ...



Emmitt Dove
Manager, DairyPak Business Systems
Evergreen Packaging, Inc.
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(203) 643-8022

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Charles Parks
Sent: Tuesday, August 19, 2008 11:46 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Integer as a condition in a while loop

Is there a setting to set when using integers in a while loop?

For example:  "WHILE fInteger1 BETWEEN 0 AND .fInteger2 THEN"

Even when fInteger1 becomes larger than fInteger2 my loop still fires.  Is
there a way to have it stop executing the loop at that point?


Reply via email to