Post Reply 
Library of programs
02-21-2020, 09:34 PM
Post: #1
Library of programs
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]

I use HP-16C, WP-34S emulator, HP-35s, HP-48GX, HP-50g, and HP Prime G2.
Find all posts by this user
Quote this message in a reply
02-21-2020, 09:50 PM (This post was last modified: 02-21-2020 09:53 PM by Carlos295pz.)
Post: #2
RE: Library of programs
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;

Viga C | TD | FB
Visit this user's website Find all posts by this user
Quote this message in a reply
02-21-2020, 11:10 PM
Post: #3
RE: Library of programs
Dear Carlos,
That worked! Thank you. Sincerely, Karel.

I use HP-16C, WP-34S emulator, HP-35s, HP-48GX, HP-50g, and HP Prime G2.
Find all posts by this user
Quote this message in a reply
Post Reply 




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