This question is mostly hypothetical/academic. I don't really have a need, just was wondering what if. The command file in question would normally be called with the argument being passed. I was just curious if I wanted to open the file through different means if I could create the variable through some sort of check function.

Ramsour Mike wrote:

Would this work they way you envision?  I think you will still need to
predefine the variable.

SET VAR V1 = NULL
--
SET VAR VENDKEY TEXT
--
IF V1 IS NULL THEN
--
 DIALOG 'Enter value for v1' v1 vEndKey 1
--
ENDIF
--
RETURN

Hope this helps.

Mike Ramsour

-----Original Message-----
From: James Hageman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 10, 2003 3:36 PM
To: [EMAIL PROTECTED]
Subject: [RBASE-L] - Create variable on the fly


I want to be able to find out if a variable exists and if not to create it and then pronpt the user to assign a value to it.


I thought I could do something like :

IF (IFEXIST(v1,.v1,NULL)) IS NULL THEN
     DIALOG 'Enter value for v1' v1 vEndKey 1
ENDIF

But I get an error message telling me v1 doesnt exist, Right! I know.





Reply via email to