[ale] p2c Problem

linuxhat at mailandnews.com linuxhat at mailandnews.com
Sat Jul 24 10:41:11 EDT 1999


On 24 Jul 1999, Jeff Hubbs wrote:

>I have some Pascal code I'm trying to compile with p2c.
>
>Problem 1:  I keep getting repeated errors like
>
>     "BIG.PAS", line 407: Warning: Unrecognized character 015 in
>     file [247]

hmm.   <guesses that "015" is hex...> man ascii... 015... 13 decimal.. CR.

The file has CR's in it, like a DOS file.  P2C is only expecting linefeeds.
Now, steenking VIM on Linux wants to go into compatibility mode and not let
you nuke out the CR's, so you have to hit it over the head to make it
behave... 

vi -b big.pas   # "binary" mode - the CR's will show up as "^M"
:%s/C-vC-m//RET # written in emacsish so you can see what's going on -
                # control-V is the "escape" character in VI, it should 
:%s/^M//        # <--- look like that.. then save the file and p2c again.

It occurs to me, though, that Pascal should be ignoring all whitespace....
at least that was the way I was taught it was supposed to be... one might
take a peek in man p2c (which I don't have handy) and see what's going on...

-- Glenn






More information about the Ale mailing list