News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

a puzzled question about code format

Started by juncy, November 07, 2012, 12:20:02 PM

Previous topic - Next topic

juncy

Hi guys,
I want to add some project information at the beginning of my .h file.
Of course I set this in the 'Default code' option as follows:
/*****************************************************************************
* This source file is part of OPTIC                                                                                                       *
*                                                                                                                                                       *
*                                                                                                                                                       *
* This program is free software; you can redistribute it and/or modify it                                             *
* under the terms of the GNU Lesser General Public License as published by                                       *
* the Free Software Foundation; either version 3 of the License, or (at                                               *
* your option) any later version.                                                                                                        *
*****************************************************************************/

BUT
When I create a .h file, it looks as follows, and I do not know how to deal with this problem.

/*****************************************************************************
* This source file is part of OPTIC                                         *
*                                                                           *
*                                                                           *
* This program is free software; you can redistribute it and/or modify it   *
* under the terms of the GNU Lesser General Public License as published by  *
* the Free Software Foundation; either version 3 of the License, or (at     *
* your option) any later version.                                           *
*****************************************************************************/

Any one could help me with it?
Thanks very much!!!

gd_on

You have probably used tab characters to generate your code. Try to use spaces only (or convert automatically tab to spaces).

gd_on
Windows 11 64 bits (25H2), svn C::B (last version or almost!), wxWidgets 3.3.2, Msys2 Compilers 16.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

MortenMacFly

Quote from: gd_on on November 07, 2012, 12:30:04 PM
You have probably used tab characters to generate your code.
Wither that, or you use a a non-monospaced font in the editor (i.e. letters don't have the same width).
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Jenna

And please, please use code-tags for any code.
It's more readable and should avoid the use of proportional (not monospaced) fontsm when shown in the browser.