help programming
|
03-22-2014, 05:43 PM
(This post was last modified: 03-22-2014 05:44 PM by Arcturus314.)
Post: #1
|
|||
|
|||
help programming
So I wrote a program that is giving me a syntax error:
EXPORT PROG1(A,B,C) BEGIN LOCAL D=0; LOCAL E=0; (-B+SQUAREROOT(B^2-4AC))/(2A)->D; (-B-SQUAREROOT(B^2-4AC))/(2A)->E; MSGBOX(D,E); END; squareroot is replaced by the square root symbol in the code So what is the problem? |
|||
03-22-2014, 05:49 PM
Post: #2
|
|||
|
|||
RE: help programming
(03-22-2014 05:43 PM)Arcturus314 Wrote: So I wrote a program that is giving me a syntax error: I presume that -> is the actual store arrow. The problem (based solely on your source code) is that MSGBOX() only takes a single argument. You've separated D and E as two arguments and there is no such instance of MSGBOX() using two arguments. Instead, try: MSGBOX({D,E}). Graph 3D | QPI | SolveSys |
|||
03-22-2014, 05:51 PM
Post: #3
|
|||
|
|||
RE: help programming
Have you tried putting a multiplication symbol (*) between the 4 and the A and the A and the C, and the 2 and he A?
BAF (03-22-2014 05:43 PM)Arcturus314 Wrote: So I wrote a program that is giving me a syntax error: |
|||
03-22-2014, 05:51 PM
(This post was last modified: 03-22-2014 05:55 PM by Arcturus314.)
Post: #4
|
|||
|
|||
RE: help programming
Thank you, that fixed it! I didn't know that msgbox only accepted 1 argument. I also assumed it would multiply variables automatically.
|
|||
03-22-2014, 06:13 PM
Post: #5
|
|||
|
|||
RE: help programming
When you press the "CHECK" button, where did the cursor go? My guess is it put it right on the message box.
TW Although I work for HP, the views and opinions I post here are my own. |
|||
03-22-2014, 06:25 PM
Post: #6
|
|||
|
|||
RE: help programming | |||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)