TIP: Click on subject to list as thread! ANSI
echo: clipper
to: ALL
from: ERIK WACHTMEESTER
date: 1997-11-10 21:40:00
subject: Determining if a private variable exists21:40:0011/10/97

Reply-To: erik.wachtmeester@bighole.iaf.nl
Hi,
I've got a problem with Clipper 5.2e:
In a user defined function, I have to determine if a certain private variable
exists, and if it's of type 'N'. This UDF could be called (indirectly) from 
the
function in which that private variable is defined, but most of the time it's
called from somewhere else.
type(nPrivVar) should return 'U' if nPrivVar isn't declared, if I'm right, 
ut
it only returns a BASE/1003 runtime error (variable not found). I tried 
several
variations ( valtype(nPrivVar), type(&nPrivVar) and valtype(&nPrivVar) ), and
all came up with the same runtime error.
The type(nPrivVar) check works OK if I declare a dummy public nPrivVar (with
value NIL), that will be overruled when a private variable with the same name 
is
declared, but IMHO that's not the solution.
Any ideas?
Regards,
Erik 
--- ifmail v.2.12-tx8.6
---------------
* Origin: May it be on this earth? (2:283/7.2)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.