errset command question

G

Gio

Guest
Good day,

I have a concern regarding errset command when used in calculator
(CALC) commands; I want to contain CALC errors into a list. In the
example below, when I invoke



errset("clip(v("net31" ?result
"timeSweeptran") 1u 2u)")



to "catch" the error using errset, the result is



errrset("clip(v("net31" ?result
"timeSweeptran") 1u 2u)")

SYNTAX ERROR found at line 29 column
23 of file *civInPort*

*Error* linread/read: syntax error
encountered in input



I follow it with



errset.errset



to see the list that contains the error but the result is (nil).
Here, I only want to get errors of CALC functions (cross, average,
clip, abs). How do I solve this problem? Your suggestions and comments
would be of great help. Thank you very much.
 
Gio wrote, on 05/07/11 09:24:
Good day,

I have a concern regarding errset command when used in calculator
(CALC) commands; I want to contain CALC errors into a list. In the
example below, when I invoke



errset("clip(v("net31" ?result
"timeSweeptran") 1u 2u)")



to "catch" the error using errset, the result is



errrset("clip(v("net31" ?result
"timeSweeptran") 1u 2u)")

SYNTAX ERROR found at line 29 column
23 of file *civInPort*

*Error* linread/read: syntax error
encountered in input



I follow it with



errset.errset



to see the list that contains the error but the result is (nil).
Here, I only want to get errors of CALC functions (cross, average,
clip, abs). How do I solve this problem? Your suggestions and comments
would be of great help. Thank you very much.
Two problems. In your example you spelt errset as errrset. The bigger problem
(that was probably just when you transcribed it) is the fact that you've put the
expression in quotation marks, and because of that you have ended up with
incorrectly matched quotation marks and hence you're getting the syntax error
during parsing - so the errset hasn't even been called at that stage. What you
want is:

errset(clip(v("net31" ?result
"timeSweeptran") 1u 2u))

Best Regards,

Andrew.
 

Welcome to EDABoard.com

Sponsor

Back
Top