Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 01:01 29 Mar 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : chdir "" resets mm.errno

Author Message
crez

Senior Member

Joined: 24/10/2012
Location: Australia
Posts: 152
Posted: 02:46am 10 Oct 2019
Copy link to clipboard 
Print this post

I thought that most commands did not effect mm.errno unless an error occurs. I was expecting it to hold the code for the last error that occurred. I was surprised to find that mm.errno was being reset to 0 in my program and narrowed it down to the chdir "\" command, even though this command did not itself cause an error. I am using the Armmite F4 firmware, but have nothing else to test it on at the moment. Has anyone else found this?
 
Cyber

Senior Member

Joined: 13/01/2019
Location: Ukraine
Posts: 161
Posted: 05:20am 10 Oct 2019
Copy link to clipboard 
Print this post

This behaviour looks ok to me.
mm.errno now contains error code for chdir "\" command, which is 0, meaning command completed successfuly.
It is common sense in other programming languages.
 
crez

Senior Member

Joined: 24/10/2012
Location: Australia
Posts: 152
Posted: 11:38am 10 Oct 2019
Copy link to clipboard 
Print this post

So it looks like I need to check for errors after each file operation. I was working on the standard micromite system where "They are reset to zero and an empty string by RUN, ON ERROR IGNORE or ON ERROR SKIP". I was relying on the info in mm.errno persisting until one of the above three commands occur. I wanted to hold off on acting on the error until a certain spot in the program where I could shut down in an orderly way. Thanks for your reply.
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024