Post Reply 
hp35s tell if variable is vector or complex
06-27-2016, 04:01 PM
Post: #4
RE: hp35s tell if variable is vector or complex
(06-27-2016 01:41 PM)Eddie W. Shore Wrote:  This would require user input, but maybe can help:

VIEW var
SF 10
"COMPLEX? Y=1, N=0"
CF 10
INPUT I // or other dummy variable
x=0?
GTO (label-line number) // If var isn't complex
GTO (label-line number) or next command if var is complex

I was going to suggest using the square root key, but using the square root key on a complex number on the 35S causes an error (silly in IMHO). I have no idea how to mitigate error messages.

Yes, thanks for the reply. I had a mix of vectors and complex on the stack which I wanted to process, which is why I didn't simply create 2 versions of the program.

Basically I have items in the X Y and Z registers. Each of which could be a complex or vector. I resorted to simply have a utility which does the conversion and staying in all complex for this case.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: hp35s tell if variable is vector or complex - dalupus - 06-27-2016 04:01 PM



User(s) browsing this thread: 1 Guest(s)