|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
sparge
Joined: 11 Apr 2005 Posts: 371
|
Posted: Thu Jun 07, 2007 2:32 pm Post subject: NULL characters giving Plato (and me) heartache |
|
|
Slightly strange one this, and certainly new to me.
I'm converting a load of old code - one routine per file - from fixed format to free format style. I had an existing Plato project based on the old code. I started the conversion process at home this morning, and created some modules, each using code from several of the existing files. When I try and compile one of them, Plato issues:
warning 610: - The file contains invalid ASCII character(s) 0 (NUL), replacing with space(s)
However, if I make any change and try and compile again, it repeats the warning - so I presume it means it is changing NULLs to spaces in the in-memory copy of the source code used to make object code, rather than changing the actual source code?
Now I'm at work and I have copied the project and renamed it (it's easier to maintain two project files, corresponding to different source locations at home and at work). In the new project, when I try and open the offending file, I get warned that the file contains NULL characters, and asked if I want to continue.
I don't know how these NULL characters got in there. I presume they weren't in there before I started the conversion process (though I can't be certain - I have built the exe previously without having all several dozen source files opened in Plato) - but clearly they are bad news. So how do I find them? I have an editor that can display in hex mode, but is there a smarter way to find the NULLs than trawling through byte by byte ?
Andy |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Fri Jun 08, 2007 7:31 am Post subject: |
|
|
Andy
I assume that you are not using the latest Plato that has just been released with FTN95 v5.10 or rather I am hoping that this is not a new Plato bug.
The message about null characters comes from FTN95 when you compile.
Plato3 should warn you about null characters when you open a file but (as far as I can remember) does not change them when you save.
I can add something to Plato to handle this situation but for the moment you can either
a) write a noddy program to process the files so that nulls are replaced.
b) find a free binary editor to find and replace the nulls. Plato allows you to read binary files but not to edit them. |
|
Back to top |
|
|
sparge
Joined: 11 Apr 2005 Posts: 371
|
Posted: Fri Jun 08, 2007 2:45 pm Post subject: Re: |
|
|
Hi Paul,
Thanks for replying. I've sorted out the problem now - my hex editor was quite capable of the job once I sorted out the appropriate syntax with which to ask it nicely.
PaulLaidler wrote: | I assume that you are not using the latest Plato that has just been released with FTN95 v5.10 or rather I am hoping that this is not a new Plato bug. |
Correct, I am still using 5.0.1 - I had not realised an update had been released.
Andy |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|