HP Forums

Full Version: Does XCas have HPPrime mode?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(Mostly for Bernard)

I am aware of the ability for XCas to switch to maple and ti mode for code compatibility. I was wondering if there is a similar mode switch so that one may simply copy HP Prime CAS programs directly from the calculator/virtual calculator into XCas and run it directly.

At the moment, I have to to manually change all BEGIN-END pairs for code blocks to { and }:; and lower modify indices of matrix[i,j] to matrix[i-1,j-1]. The HP Prime code resembles maple syntax for some things (indices) but not everything (equality checks are == on the Prime and = in maple) so it seems maple compatibility mode does not work directly.

Any suggestion?
Try calc_mode(-38). If there are keywords not recognized please list them. BEGIN/END should work in Xcas, you don't need to replace by { }
I seem to have run into a very strange roadblock.

Copying the following line from Maple (and remove the "Matrix( )") gives me errors in line 10 and at various columns...


Code:

M:=[[44,48,82,48,55,-65,-20],
[72,-86,-16,77,-46,-28,-28],
[23,-26,-46,-87,88,6,-16],
[14,69,71,-78,-74,81,-27],
[-87,81,-88,51,-8,68,48],
[-46,-59,-69,84,31,45,-28],
[99,84,56,-66,92,-31,-63],
[33,44,93,-37,-20,39,-4],
[-40,-48,10,-58,31,78,81],
[-22,10,-26,-97,37,-9,-54]];
*****************************************************
:1: syntax error, unexpected T_MOINS38 line 1 col 21 at -

:1: syntax error, unexpected T_MOINS38 line 1 col 25 at -

:2: syntax error, unexpected T_MOINS38 line 2 col 5 at -

:2: syntax error, unexpected T_MOINS38 line 2 col 9 at -

:2: syntax error, unexpected T_MOINS38 line 2 col 16 at -

:2: syntax error, unexpected T_MOINS38 line 2 col 20 at -

:2: syntax error, unexpected T_MOINS38 line 2 col 24 at -

:3: syntax error, unexpected T_MOINS38 line 3 col 5 at -

:3: syntax error, unexpected T_MOINS38 line 3 col 9 at -

:3: syntax error, unexpected T_MOINS38 line 3 col 13 at -

:3: syntax error, unexpected T_MOINS38 line 3 col 22 at -

:4: syntax error, unexpected T_MOINS38 line 4 col 11 at -

:4: syntax error, unexpected T_MOINS38 line 4 col 15 at -

:4: syntax error, unexpected T_MOINS38 line 4 col 22 at -

:5: syntax error, unexpected T_MOINS38 line 5 col 2 at -

:5: syntax error, unexpected T_MOINS38 line 5 col 9 at -

:5: syntax error, unexpected T_MOINS38 line 5 col 16 at -

:6: syntax error, unexpected T_MOINS38 line 6 col 2 at -

:6: syntax error, unexpected T_MOINS38 line 6 col 6 at -

:6: syntax error, unexpected T_MOINS38 line 6 col 10 at -

:6: syntax error, unexpected T_MOINS38 line 6 col 23 at -

:7: syntax error, unexpected T_MOINS38 line 7 col 11 at -

:7: syntax error, unexpected T_MOINS38 line 7 col 18 at -

:7: syntax error, unexpected T_MOINS38 line 7 col 22 at -

:8: syntax error, unexpected T_MOINS38 line 8 col 11 at -

:8: syntax error, unexpected T_MOINS38 line 8 col 15 at -

:8: syntax error, unexpected T_MOINS38 line 8 col 22 at -

:9: syntax error, unexpected T_MOINS38 line 9 col 2 at -

:9: syntax error, unexpected T_MOINS38 line 9 col 6 at -

:9: syntax error, unexpected T_MOINS38 line 9 col 13 at -

:10: syntax error, unexpected T_MOINS38 line 10 col 2 at -

:10: syntax error, unexpected T_MOINS38 line 10 col 9 at -

:10: syntax error, unexpected T_MOINS38 line 10 col 13 at -

:10: syntax error, unexpected T_MOINS38 line 10 col 20 at -

:10: syntax error, unexpected T_MOINS38 line 10 col 23 at -

Syntax compatibility mode maple
Parse error line 1 at -
This is related to unary vs binary minus (was introduced for the hp39gii). I can easily modify the parser in Xcas and remove that constraint. You can replace - by 0- and it should work.
Reference URL's