G'day JM,

Try this:

SET VAR vItCheck INTEGER = NULL
SET VAR vItCheck INTEGER = .vIteration
IF vItCheck IS NULL THEN
   SET VAR vIteration INTEGER = 0
ENDIF

It will not work for text value var as it will set vItCheck
to the var name it is checking.

It will throw an error message if you have
SET MESSAGES ON
SET ERROR MESSAGES ON
so if you otherwise want to run that way I suggest:


SET MESSAGES OFF
SET ERROR MESSAGES OFF
SET VAR vItCheck INTEGER = NULL
SET VAR vItCheck INTEGER = .vIteration
IF vItCheck IS NULL THEN
   SET VAR vIteration INTEGER = 0
ENDIF
SET MESSAGES ON
SET ERROR MESSAGES ON



At 12:52 14/02/02 -0500, you wrote:

>Hi all,
>
>
>I am looking for a way to check if a variable has been already defined.
>
>A way that don't display an error.
>
>Is there a function for that ?
>
>Or may be a tip  ....
>
>TIA
>
>
>J.M. GRATIAS, Logimatique
>================================================
>TO SEE MESSAGE POSTING GUIDELINES:
>Send a plain text email to [EMAIL PROTECTED]
>In the message body, put just two words: INTRO rbase-l
>================================================
>TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
>In the message body, put just two words: UNSUBSCRIBE rbase-l
>================================================
>TO SEARCH ARCHIVES:
>http://www.mail-archive.com/rbase-l%40sonetmail.com/

Warmest regards,


Tom Grimshaw
coy:    Just For You Software
tel:    612 9552 3311
fax:    612 9566 2164
mobile: 0414 675 903

post:   PO Box 470  Glebe  NSW  2037  Australia
street: 3/66 Wentworth Park Rd  Glebe  NSW  2037

email:  [EMAIL PROTECTED]
web: www.just4usoftware.com.au

This email and any files transmitted with it are confidential to the 
intended recipient and may be privileged. If you have received this email 
inadvertently or you are not the intended recipient, you may not 
disseminate, distribute, copy or in any way rely on it. Further, you should 
notify the sender immediately and delete the email from your computer. 
Whilst we have taken precautions to alert us to the presence of computer 
viruses, we cannot guarantee that this email and any files transmitted with 
it are free from such viruses.

================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/

Reply via email to