Silverfrost Forums

Welcome to our forums

NULL characters giving Plato (and me) heartache

7 Jun 2007 1:32 #1948

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

8 Jun 2007 6:31 #1949

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

  1. write a noddy program to process the files so that nulls are replaced.

  2. find a free binary editor to find and replace the nulls. Plato allows you to read binary files but not to edit them.

8 Jun 2007 1:45 #1952

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.

Quoted from PaulLaidler 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

Please login to reply.