Library of programs - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: Library of programs (/thread-14545.html) |
Library of programs - cahlucas - 02-21-2020 09:34 PM Hi all, For all my projects on the HP Prime I am going to create some library files with various subroutines that can be called by external programs. This way I don't have to make these subroutines every time a new program is created. But here I encountered a problem. When creating the file I received the error message "Syntax error in program line 4" (see the code fragment). This error occurs when I close the editor with this file. The name of the file is "SYSTEM_LIB". The names of the routines currently in it are: "RCL_SETTINGS", and "STO_SETTINGS". Other routines will follow once this issue is resolved. I would like to know how I can solve this problem. Sincerely, Karel.[/code] [code] #pragma mode(separator(., integer(h32)) SYSTEM_LIB; EXPORT RCL_SETTINGS(); BEGIN LOCAL l; l:=HVars("Mode"); HAngle:=l(1);HFormat:=l(2); HSeparator:=l(3);HDigits:=l(4); HComplex:=l(5);Entry:=l(6); Base:=l(7);Bits:=l(8);Signed:=l(9); END; EXPORT STO_SETTINGS(); BEGIN HVars("Mode"):={HAngle;HFormat;HSeparator;HDigits;HComplex;Entry;Base;Bits;Signed}; END; [endcode] RE: Library of programs - Carlos295pz - 02-21-2020 09:50 PM Code:
RE: Library of programs - cahlucas - 02-21-2020 11:10 PM Dear Carlos, That worked! Thank you. Sincerely, Karel. |