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