Page 4 of 7

Re: Getting NAME ERR when I save program raw files

Posted: Wed Oct 14, 2020 5:26 am
by HPMike
Duplicate post - sorry

Re: Getting NAME ERR when I save program raw files

Posted: Wed Oct 14, 2020 12:58 pm
by PierreMengisen
Hi BOB
I have detected two situations that generate the problem "NAME ERR".

a) no program in the program editor and the alpha register without correspondence with an existing label.

b) an active program in the editor and a name that does not match the program label.

Hoping to help solve the problem, greetings to the whole team.

Re: Getting NAME ERR when I save program raw files

Posted: Wed Oct 14, 2020 3:19 pm
by rprosperi
Thanks for these updates.

About Folders: There is no need to create folders manually; if the 41X needs to write files to a folder, it will properly create the folder as needed.

About state files: Yes it is feasible for a state file to be corrupt and restoring it could bring a problem back to a 'fixed' system, so it's best to not do that, assuming you know of course. Most often you don't know and the very act of restoring a state file leading to a problem can be the way such corrupted state file problems are identified.

@PierreMengisen - Thanks for these hints, we'll try to reproduce this and get back to you.

Re: Getting NAME ERR when I save program raw files

Posted: Wed Oct 14, 2020 4:35 pm
by rprosperi
Pierre has provided the hints that have allowed this small mystery to be resolved, I think.

I mistakenly assumed folks using this feature were familiar with the 41CX SAVEP command (for saving files to Ext Mem) as this error is from the analogous "Save RAW Program" feature in the 41X, and that they had ruled out the 'normal' causes of this error message, but I now suspect that the issue is simply not understanding how SAVEP works. While the 41X manual does make explicit reference to being "...equivalent to SAVEP..." the manual should be clarified to convey that arguments, errors, etc. are all patterned after SAVEP's behavior.

To clarify some points, possibly being misunderstood:

1. The name you provide in Alpha prior to invoking "Save RAW Program" is to specify which existing FOCAL program name (the Global label closest to the top of the program) to save, and not the filename you want to save it to. That FOCAL program is then saved to a .raw file with the filename you specify.

a. If there is no FOCAL program with the name specified in Alpha, then you will see the "NAME ERR" message, to tell you there is no FOCAL program with that name, and then a zero byte file with the name you specified is created. (We'll explore if this empty file creation should/can be avoided)

b. If Alpha is empty, the current FOCAL program (that PRGM is currently in) with the name you specified is created; this file is never zero bytes, as even an apparenlty 'empty' program does contain some bytes

So, "NAME ERR" is basically just telling you that the program you told it to save does not exist, and the zero byte files are the result of saving 'nothing' to a file specified in the save process.

This also explains why following the steps I provided last night worked properly, as each file was correctly specified.

So, could all the users that have experienced this error please try again, being sure to specify an existing FOCAL program name, and report results, both to confirm if this resolves the issue, or not.

Thanks for the hint Pierre!! :)

Re: Getting NAME ERR when I save program raw files

Posted: Wed Oct 14, 2020 5:04 pm
by HPMike
Bob, my experience is that once this problem occurs, it will continue to occur regardless of what program you choose to save or how you do it, until you reset the calculator and start again with cleared memory. This morning I wrote and successfully saved multiple programs, including programs with filenames that were different from the global label at the beginning of the program. I then attempted to save a module program, and got the NAME ERR message. I tried to resave another program that had worked previously, and again got the same error. Reset the calculator, and now it works again. Reloaded a good state file, and it still works. So one thing I think we can agree on is that once this problem occurs, regardless of the cause, memory is corrupt and a calculator reset is required. And any state files that were created after the occurance of this error will be corrupt as well.

Again, I’d appreciate if you’d provide us all with a step-by-step, keystroke-by-keystroke display of how YOU think .raw file saving to the FAT disk should/does take place. Thanks.

Re: Getting NAME ERR when I save program raw files

Posted: Wed Oct 14, 2020 5:40 pm
by PierreMengisen
rprosperi wrote:
Wed Oct 14, 2020 4:35 pm

1. The name you provide in Alpha prior to invoking "Save RAW Program" is to specify which existing FOCAL program name (the Global label closest to the top of the program) to save, and not the filename you want to save it to. That FOCAL program is then saved to a .raw file with the filename you specify.

a. If there is no FOCAL program with the name specified in Alpha, then you will see the "NAME ERR" message, to tell you there is no FOCAL program with that name, and then a zero byte file with the name you specified is created. (We'll explore if this empty file creation should/can be avoided)

b. If Alpha is empty, the current FOCAL program (that PRGM is currently in) with the name you specified is created; this file is never zero bytes, as even an apparenlty 'empty' program does contain some bytes
All this seems to me to be very clearly expressed. Thank you BOB for articulating it in this forum. These points 1. a. and b. should be added to the DM42 user manual. It's worth it.

Regards

Re: Getting NAME ERR when I save program raw files

Posted: Wed Oct 14, 2020 5:41 pm
by Peet
HPMike wrote:
Wed Oct 14, 2020 5:04 pm
Again, I’d appreciate if you’d provide us all with a step-by-step, keystroke-by-keystroke display of how YOU think .raw file saving to the FAT disk should/does take place. Thanks.
So do I, because the terminology can create misunderstandings.
There is:

FAT-Filename i.e. calendar.raw
PRG Label i.e. LBL "CAL"
Alpha Register i.e. Monday
The Name that Save RAW asks.

But what means: FOCAL program with the name specified in Alpha?

Re: Getting NAME ERR when I save program raw files

Posted: Wed Oct 14, 2020 5:41 pm
by rprosperi
You cannot save a module program, even if it's FOCAL, directly from ROM, however you can copy it from ROM to RAM, and once it's in RAM (user program space) then save it as RAW in the normal way.

The example I wrote last night is exactly what you want, right? You followed it and it worked.

And examples of what does work are not really so helpful, since they do and should work. What is needed, if indeed there is a bug to find, is a keystroke-by-keystroke example, from a known pristine state of a save sequence that does not behave correctly. Discard all your saved known bad / possibly bad saved files to prevent them from polluting your test environment and only work with new files, created and saved using the proper procedures. I don't think you'll encounter it again.

After recreating the NAME ERR error message an hour ago (done by not specifying a valid program name) I am able to create new programs and save them without any problems.

Re: Getting NAME ERR when I save program raw files

Posted: Wed Oct 14, 2020 5:56 pm
by rprosperi
Peet wrote:
Wed Oct 14, 2020 5:41 pm
HPMike wrote:
Wed Oct 14, 2020 5:04 pm
Again, I’d appreciate if you’d provide us all with a step-by-step, keystroke-by-keystroke display of how YOU think .raw file saving to the FAT disk should/does take place. Thanks.
So do I, because the terminology can create misunderstandings.
There is:

FAT-Filename i.e. calendar.raw
PRG Label i.e. LBL "CAL"
Alpha Register i.e. Monday
The Name that Save RAW asks.

But what means: FOCAL program with the name specified in Alpha?
FOCAL program means the program you want to save to RAW (FOCAL means User Program language)

In your example, if you want to save the program with LBL "CAL", to a new RAW file named "calendar.raw", do this:

1. Start in Calculator mode (i.e. not PRGM mode)
2. [alpha] [C] [A] [L] [alpha] (to put CAL into Alpha)
3. [cst] [4] (which is shortcut for [shift] [SETUP] [1] [4]) to start Save function
4. Press ENTER (to select New File)
5. type in the name: calendar
6. press [r/s] to confirm

The old contents of Alpha (it appears it was "Monday") does not matter.

Re: Getting NAME ERR when I save program raw files

Posted: Wed Oct 14, 2020 7:06 pm
by Peet
Tried it in this way with two different PRG as <new file> and it works.
I was referring NAME ERR to a wrong name for the raw file. I never had the idea to put a LBL-Name in Alpha.