You could try using
DO ^DIM
You would have to have
Set X="Set RESULT=$Get("_PREF_")"
to get ^DIM to evaluate the string properly. Does this make sense?
Jim
----- Original Message -----
From: "Kevin Toppenberg" <[EMAIL PROTECTED]>
To: "Hardhats Sourceforge" <[email protected]>
Sent: Saturday, February 11, 2006 6:43 AM
Subject: [Hardhats-members] Protecting against indirection errors.
I have a question about how to protect against indirection errors.
Imagine this function
MyFunct(pRef)
new result
set result=$get(@pRef)
quit result
Here are some possible inputs and results:
pRef
Input Output
------ ----------
#1 ^VA(200,1,0) IRM,[EMAIL PROTECTED]
#2 ^VA(200,1) ""
#3 ^VA(200,,0) <----- causes error.
In entry #2: if the data does not exist, then $get() protects against
a crash and returns a "" value.
But in entry #3, the indirection variable is invalid and causes an error.
Is there anyway for a function to protect itself against invalid
indirection errors, short of setting up an error trap? I can't think
of any reasonable way to try to validate input values other than
perhaps a simple test to ensure pRef'="" (which would only catch one
possible error).
Thanks
Kevin
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=k&kid3432&bid#0486&dat1642
_______________________________________________
Hardhats-members mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hardhats-members
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Hardhats-members mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hardhats-members