TRIANGLE SOLVER

01172022, 08:15 PM
(This post was last modified: 03092022 08:34 PM by BERNARD MICHAUD.)
Post: #1




TRIANGLE SOLVER
TRIANGLE SOLVER: Updated Jan. 28,2022
Final correction to the program. Not sure if this occurs in Window but does occur on the Mac. If you download the program and you get an error do the following. With the program name Highlighted press [Edit] goto the last line of the program, by pressing [Shift] and down on the Navigation circle which will take you directly to line 330 End; and delete any characters following the ; example:330 End; [] [] a 

03022022, 07:59 PM
(This post was last modified: 03032022 09:40 PM by Tim Roche.)
Post: #2




RE: TRIANGLE SOLVER
Bernard
Tried your triangle solver program on my win10 virtual calculator (2021 10 01) and my old (G1) prime (2021 12 02). In both instances the loaded program gives a syntax error on line 288. (I noticed your warning about extra characters at the tail of the program listing and checked.) There does not seem to be any error on line 288 that I discern. Could you suggest what I might do to remedy this problem? Tim ter 

03082022, 01:36 AM
(This post was last modified: 03082022 03:02 PM by BERNARD MICHAUD.)
Post: #3




RE: TRIANGLE SOLVER
(03022022 07:59 PM)Tim Roche Wrote: Bernard Line 288 should read: Also Check variable Z1 to see if it is active. 286 IF mnu THEN MENU(); END; 287 // 288 D:=√((X1x2)^2+(Y1y2)^2);Z1:=((X1+x2)/2,(Y1+Y2)/2); 289 Slp:=(Y2Y1)/(X2X1);θ:=ATAN(Slp);Int:=Y1X1*Slp; 290 // 328 EXPORT TRIANGLES() 329 BEGIN 330 2▶AFormat; 331 3▶ADigits; 332 MENU(); 333 END; Odd characters will appear here This may not appear on Window version but it does on a Mac. 

03092022, 02:24 AM
Post: #4




RE: TRIANGLE SOLVER
Bernard,
Thank you for replying to my query. I have looked at line 288 in your Triangle Solver code and can find no discrepancies with the listing in your reply; this is not a surprise, as the code is that which you uploaded in the original post. Yet on my Win10 laptop the virtual prime (2021 10 1) stops the compilation at line 288. Concerning line 333 at the end of the file, I see the following (removing the comment characters has no effect) 327 // 328 EXPORT TRIANGLES() 329 BEGIN 330 2▶AFormat; 331 3▶ADigits; 332 MENU(); 333 END;// Wondering if I am alone with this difficulty. ter 

03092022, 02:52 AM
Post: #5




RE: TRIANGLE SOLVER
(03092022 02:24 AM)Tim Roche Wrote: Bernard, Hi Tim I resent the program as a (.hpprgm) format rather than a .zip format. Let me know if that works. Bernard 

03092022, 04:45 AM
Post: #6




RE: TRIANGLE SOLVER
I maybe wrong but I did not find lower case x2 or lower case y2 declared any where so I changed them to upper case X2 and Y2 and the program appeared to work
288 D:=√((X1x2)^2+(Y1y2)^2);Z1:=((X1+x2)/2,(Y1+Y2)/2) 

03092022, 06:47 AM
Post: #7




RE: TRIANGLE SOLVER
Bernard,
Dougggg is correct. (Nice catch.) The formulas for both distance D and midpoint Z1 should read (all caps): 288 D:=√((X1X2)^2+(Y1Y2)^2);Z1:=((X1+X2)/2,(Y1+Y2)/2) With that edit your program compiles and runs as you indented. Thanks Douggggg and Bernard. ter 

03092022, 01:40 PM
Post: #8




RE: TRIANGLE SOLVER
Thanks Tim and Douggg
I updated the program. Obviously an error on my part. x2 and y2 were declared as Global variables on a different program I am working on and the Triangle Solver worked on my G2, so I assumed that every thing was ok. Thanks again and I hope you find the program useful. Bernard 

« Next Oldest  Next Newest »

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