HP Forums
hp41cx utility function to trim an ASCII EM file - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: hp41cx utility function to trim an ASCII EM file (/thread-14467.html)



hp41cx utility function to trim an ASCII EM file - twdeckard - 02-04-2020 01:05 AM

Can anyone help me recall a small utility function that automatically resized an EM flle to the minimum size for its current number of records?

I thought it was in the original forum?

Thanks!
Todd


RE: hp41cx utility function to trim an ASCII EM file - Lyle Lower - 02-04-2020 03:04 AM

I believe this post may be what you are looking for?

https://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv013.cgi?read=38991

Cheers,

Lyle


RE: hp41cx utility function to trim an ASCII EM file - dayd - 02-04-2020 03:57 AM

You may have to adapt to fit your needs but here’s one:
https://www.hpmuseum.org/forum/thread-6552-post-60476.html#pid60476

André


RE: hp41cx utility function to trim an ASCII EM file - Ángel Martin - 02-04-2020 06:03 AM

(02-04-2020 01:05 AM)twdeckard Wrote:  Can anyone help me recall a small utility function that automatically resized an EM flle to the minimum size for its current number of records?

I thought it was in the original forum?

Define "minimum number of records": all non-zero, consecutive, at the END of the file; is that it?
So the routine4 will have to start checking from the last record, counting records until finding the first non-zero value. There can be more zero records in-between that one found and the file head, but those should remain, correct?


RE: hp41cx utility function to trim an ASCII EM file - twdeckard - 02-04-2020 12:58 PM

(02-04-2020 03:57 AM)dayd Wrote:  You may have to adapt to fit your needs but here’s one:
https://www.hpmuseum.org/forum/thread-6552-post-60476.html#pid60476

André
perfect! that was it


RE: hp41cx utility function to trim an ASCII EM file - dayd - 02-05-2020 01:50 AM

(02-04-2020 12:58 PM)twdeckard Wrote:  perfect! that was it

Well... not so perfect it seems, I found a mistake and made a little correction;
=> PKFLAS