suggestion: identify defined variables ( in cas )
|
03-27-2014, 03:15 PM
(This post was last modified: 03-27-2014 03:19 PM by Han.)
Post: #2
|
|||
|
|||
RE: suggestion: identify defined variables ( in cas )
(03-27-2014 02:11 PM)Angus Wrote: hi again, Check its type before you do anything with it. Note that type() -- a CAS command -- is different from TYPE() -- a non-CAS command. If you use type(x) and it returns DOM_IDENT then you have an undefined variable. Otherwise, you will get the actual type of the object stored in x. The only possible scenario when this wouldn't work is if another variable is stored in x (e.g. if you do x:=y; first). So first check if type(x) == DOM_IDENT then double check that x=='x' (in which case x is an actual "empty" variable; i.e. x does not contain another variable name as its value). Graph 3D | QPI | SolveSys |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
suggestion: identify defined variables ( in cas ) - Angus - 03-27-2014, 02:11 PM
RE: suggestion: identify defined variables ( in cas ) - Han - 03-27-2014 03:15 PM
|
User(s) browsing this thread: 1 Guest(s)