Form feed character in header files

G

Guest

Hi,

On Cygwin, most of the header files for gcc and g++ used UNIX style
line breaks, so I've been replacing these (by copying into Wordpad
from Notepad and then copying out again) with Windows-style line
breaks. However, this doesn't get rid of instances of character 12
(Form Feed).

Is there any reason why it wouldn't be safe to delete these and thus
improve the readability of the files? Does the compiler just ignore
them?

Thanks,

James McLaughlin.
 
S

Srini

Hi,
On Cygwin, most of the header files for gcc and g++ used UNIX style
line breaks, so I've been replacing these (by copying into Wordpad
from Notepad and then copying out again) with Windows-style line
breaks. However, this doesn't get rid of instances of character 12
(Form Feed).
Is there any reason why it wouldn't be safe to delete these and thus
improve the readability of the files? Does the compiler just ignore
them?

James McLaughlin.

This is not a question related to C++. Try posting in an appropriate
newsgroup. However, I think replacing line-breaks would not affect the
compilation in any way.

Srini
 
I

Imre Palik

On Cygwin, most of the header files for gcc and g++ used UNIX style
line breaks, so I've been replacing these (by copying into Wordpad
from Notepad and then copying out again) with Windows-style line
breaks. However, this doesn't get rid of instances of character 12
(Form Feed).

Is there any reason why it wouldn't be safe to delete these and thus
improve the readability of the files? Does the compiler just ignore
them?

Paragraph 2.2 of the C++ standard says:

The basic source character set consists of 96 characters: the space
character, the control characters representing horizontal tab,
vertical tab, form feed, and newline, ...

I.e. they are safe, and not ignored.

ImRe
 
M

Mike Wahler

Srini said:
This is not a question related to C++.

Yes it is. See ISO 1488 para 2 2.2
Try posting in an appropriate
newsgroup.

This group is the right one.
However, I think replacing line-breaks would not affect the
compilation in any way.

The answer is that it's 'safe' to either leave the form-feed
characters there or to remove them (IF none of them is the only
delimiter between tokens). Except within literals, whitespace
is automatically skipped during translation. 'Form-feed' is listed
by the standard as a required member of the execution character set.



-Mike
 
S

Srini

This is not a question related to C++.
Yes it is. See ISO 1488 para 2 2.2
This group is the right one.
The answer is that it's 'safe' to either leave the form-feed
characters there or to remove them (IF none of them is the only
delimiter between tokens). Except within literals, whitespace
is automatically skipped during translation. 'Form-feed' is listed
by the standard as a required member of the execution character set.

My mistake. I apologise. I did not know about this. Thanks Mike.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,169
Messages
2,570,919
Members
47,458
Latest member
Chris#

Latest Threads

Top