NO

Author Topic: Pragma Do Not Reformat Block  (Read 2809 times)

Offline drhoule

  • Member
  • *
  • Posts: 10
Pragma Do Not Reformat Block
« 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.

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: Pragma Do Not Reformat Block
« Reply #1 on: March 20, 2015, 09:17:26 AM »
 :(
What you mean? The compiler reformats what you write?
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline DMac

  • Member
  • *
  • Posts: 272
Re: Pragma Do Not Reformat Block
« Reply #2 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.
No one cares how much you know,
until they know how much you care.

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: Pragma Do Not Reformat Block
« Reply #3 on: March 20, 2015, 05:00:23 PM »
comments may help
Code: [Select]
char test[] = //
"Start of very long" //
" more " //
" more " //
"End of long text"; //
May the source be with you