Post Reply 
referencing complex numbers in the programming mode
10-25-2019, 07:30 PM
Post: #1
referencing complex numbers in the programming mode
I have been trying to start on a program that deals with complex numbers and find that the programming mode does not handle complex numbers in manner that might be considered intuitive. For example, the code:
ACV = (SpeedAC ,∡ HeadingAC);
msgbox("AC =" +ACV);

returns 0

While the code:
msgbox("AC =" +(SpeedAC ,∡ HeadingAC));

returns the complex number

why the difference?
how should it be done?
Does the program need to know that ACV is a complex number? I have tried using one of the built in complex number variables (Z0) and get the same result (0).

Also how do one type in the angle symbol in the connectivity kit? I got it in by typing it in the calculator first and then uploading the program to the kit.
Find all posts by this user
Quote this message in a reply
10-26-2019, 01:00 AM
Post: #2
RE: referencing complex numbers in the programming mode
Oh My!!!! Did I sleep over that syntax error.
I transition between different languages so often I really missed this one.

In case anyone else happens on this I will respond to my own post.

The equals sign does not assign values. Not sure what is does at this point perhaps used for testing in a branch?

Assignments are made with := like mathcad.

It all works.
Find all posts by this user
Quote this message in a reply
10-26-2019, 03:09 AM
Post: #3
RE: referencing complex numbers in the programming mode
(10-26-2019 01:00 AM)gregreenwood Wrote:  Oh My!!!! Did I sleep over that syntax error.
I transition between different languages so often I really missed this one.

In case anyone else happens on this I will respond to my own post.

The equals sign does not assign values. Not sure what is does at this point perhaps used for testing in a branch?

Assignments are made with := like mathcad.

It all works.

I've been there! BASIC is my main computer language and I tend to use = for both assignment and comparison. Of course the assignment doesn't work on Prime. Fortunately (or not depending on how you look at it) Prime accepts both = and == in a comparison at the moment. It may change at a future date, however.

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
Post Reply 




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