HP Forums
Memory/programming question - 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: Memory/programming question (/thread-239.html)



Memory/programming question - Dougggg - 12-25-2013 10:36 PM

I have trouble with I think big programs ie HP_ELEMENTS shows it is 23k when it is actually 48k, it worked fine for a while and registered 48k but after adding some more programs today it now shows 23k and wont run and if I goto edit and check it show syntax error in line 120. other programs appear fine but most are pretty small, I did the flash test on the F-C-o menu and it came back NG it listed I think a bad block, is that causing the problem could the loading more programs be pushing the compile memory up to where the bad block is


RE: Memory/programming question - Terje Vallestad - 12-25-2013 11:19 PM

(12-25-2013 10:36 PM)Dougggg Wrote:  I have trouble with I think big programs ie HP_ELEMENTS shows it is 23k when it is actually 48k, it worked fine for a while and registered 48k but after adding some more programs today it now shows 23k and wont run and if I goto edit and check it show syntax error in line 120. other programs appear fine but most are pretty small, I did the flash test on the F-C-o menu and it came back NG it listed I think a bad block, is that causing the problem could the loading more programs be pushing the compile memory up to where the bad block is
Hi,

You could try to enter "elements();" without the quotes at or near the top of the file. Also you need to change an INT function to IP if that is the location where you get the Syntax error. That fixed things for me.

Cheers, Terje


RE: Memory/programming question - Dougggg - 12-25-2013 11:34 PM

thank you, the "elements();" did the trick


RE: Memory/programming question - Han - 12-26-2013 02:04 AM

(12-25-2013 10:36 PM)Dougggg Wrote:  I have trouble with I think big programs ie HP_ELEMENTS shows it is 23k when it is actually 48k, it worked fine for a while and registered 48k but after adding some more programs today it now shows 23k and wont run and if I goto edit and check it show syntax error in line 120. other programs appear fine but most are pretty small, I did the flash test on the F-C-o menu and it came back NG it listed I think a bad block, is that causing the problem could the loading more programs be pushing the compile memory up to where the bad block is

Since someone else already addressed the program not running, I will try to explain the changing program sizes. The size of each "program" (source file) is not just the size of the source code, but also the size of associated variables. In particular, HP_ELMENTS creates several variables (large lists). These lists are then created when you compile the source (by exiting the editor or by pressing "Check" from the menuline). So if a program compiles properly, any initialized variables are created and their size are added to the size of the source file. If the program does not compile due to, say, a syntax error, then the size you see is merely the size of the source file itself as nothing being the source file has been created.