HP Forums

Full Version: Library of programs
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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(.,Wink 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]
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;
Dear Carlos,
That worked! Thank you. Sincerely, Karel.
Reference URL's