Whilst I appreciate that it is sometimes nice to know if a variable already exists (and, if so, maybe even its value) but I would suggest that it is much better to declare _all_ of them at the start of your app/cmd file/eep/whatever and _never_ clear them until the end.
Of course there will always be exceptions but I have found it much easier to be able to see all the vars at the top of the file and their data type in one place. If I need to reset any I simply set it to null or a specific value before use. Would anybody like to comment on the overhead of keeping variables defined against regularly setting and clearing them (and, maybe losing them)? With computing power such as it is these days can a practical limit be reached? Regards, Alastair. ----- Original Message ----- From: "James Hageman" <[EMAIL PROTECTED]> To: "RBASE-L Mailing List" <[EMAIL PROTECTED]> Sent: Wednesday, September 10, 2003 9:24 PM Subject: [RBASE-L] - Re: Create variable on the fly > I like that, short and sweet. However it does give a warning about > setting the variable to NULL without indicator variable or something, > but it still works and holds the assigned value if it is defined. Cool > Thanks Jim > James > > > Jim Limburg wrote: > > > James > > > > Just use > > > > SET VAR v1 TEXT > > > > ... or whatever datatype is is delcared to as before. Be sure to > > keep the datatypes the same though.. > > > > Don't set it to null. Doing it this way will not clear the variables > > setting if it already exist, but well set it to NULL if it doesn't exist. > > > > Jim Limburg > > > > > > > > James Hageman wrote: > > > >> 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. > >> > >> >

