Pelles C forum

C language => Beginner questions => Topic started by: drhoule on March 19, 2015, 05:52:02 PM

Title: Pragma Do Not Reformat Block
Post by: drhoule on March 19, 2015, 05:52:02 PM
Pragma Do Not Reformat Block
Is there a pragma directive or other ways to protect a btext block format.

Example:

#pragma noreformat
char test[]=
     "Start of very long"
     " more "
     " more "
     "End of long text";
#pragma reformat
char test[]="Start of very long"" more "" more ""End of long text";

For now I declare it as an external in anther file and never reformat that file.

Thank you in advance.
Dr.
Title: Re: Pragma Do Not Reformat Block
Post by: frankie on March 20, 2015, 09:17:26 AM
 :(
What you mean? The compiler reformats what you write?
Title: Re: Pragma Do Not Reformat Block
Post by: DMac on March 20, 2015, 04:22:58 PM
I am going to assume that this question is in reference to selecting all text in a source file and choosing Convert To>Formatted C Code.  This tends to take long statements that one has broken up over several lines and combine them on one line.

If that is the case, I don't know of a way to prevent it.
Title: Re: Pragma Do Not Reformat Block
Post by: TimoVJL on March 20, 2015, 05:00:23 PM
comments may help
char test[] = //
"Start of very long" //
" more " //
" more " //
"End of long text"; //