HP Forums
Check FileExistance in Hepax - 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: Check FileExistance in Hepax (/thread-1118.html)



Check FileExistance in Hepax - sugarfox - 04-19-2014 11:37 AM

Hi!
I wrote a new survey package on the 41 (go41cx emulator) and used the hepax system. I integrated a littel Point Management which is based on a file for each Point. The PointNumbers are represented by the filenames and inside I store x/y.
So I have functions for set, get list and delete pointinformation.
But I need a function to check if a point (i.e. a file) exists or not, to avoid errors when I call Pointinformation in my cogo-programs.
Any Suggestions?

Best,
Johannes

PS: If someone is interested, I will post the Manual here, hepax file and manual were sent to Mr. Farlow too.


RE: Check FileExistance in Hepax - Raymond Del Tondo - 04-19-2014 01:40 PM

Hi,

at least the X-Memory file management functions have some kind of error feedback in case a wanted file doesn't exist. Maybe the HEPAX functions offer a similar feedback? If yes, you could simply create an error trap (SF 25) before a file selection, and handle it depending on the result (FS? 25 XEQ ErrHandler).


RE: Check FileExistance in Hepax - sugarfox - 04-19-2014 01:49 PM

(04-19-2014 01:40 PM)Raymond Del Tondo Wrote:  Hi,

at least the X-Memory file management functions have some kind of error feedback in case a wanted file doesn't exist. Maybe the HEPAX functions offer a similar feedback? If yes, you could simply create an error trap (SF 25) before a file selection, and handle it depending on the result (FS? 25 XEQ ErrHandler).

Hi Ray!
I think thats it! I didnt write hp41 code since 25 years and didnt remember this possibility! Yes there is a error given back. I'll try it in time!
Thank you very much !

Best,
Johannes


RE: Check FileExistance in Hepax - Raymond Del Tondo - 04-19-2014 11:43 PM

Hi Johannes,

glad I could help:-)

But since I also don't program the HP-41 every day, my description contained a small error. It should read: SF 25 Stmt_to_trap FC? 25 XEQ ErrHandler, because an error condition will clear flag 25.

Cheers


RE: Check FileExistance in Hepax - sugarfox - 04-29-2014 10:25 PM

Hi Raymond,
thanks again for the hint, everything runs very good!

Best,
Johannes


(04-19-2014 11:43 PM)Raymond Del Tondo Wrote:  Hi Johannes,

glad I could help:-)

But since I also don't program the HP-41 every day, my description contained a small error. It should read: SF 25 Stmt_to_trap FC? 25 XEQ ErrHandler, because an error condition will clear flag 25.

Cheers