Quick Navigation Bar creating libraries :: tips and tricks :: overview [ toc | forums ] |
Note: If the document URL does not begin with https://randu.org/tutorials/c/ then you are viewing a copy. Please direct your browser to the correct location for the most recent version. |
Below is a listing of a few tips you can use when you are programming. This article has been translated to Serbo-Croatian language.
*/
comment end
is prematurely termanating your comment block. You can utilize the
C Preprocessor's #if
directive to circumvent this:
#if 0 /* This code here is the stuff we want commented */ if (a != 0) { b = 0; } #endif
#define
.
Expanding on that, it is even more convenient if you write
a macro (using the PRINTF() macro from the I/O section):
#ifdef DEBUG #define DPRINTF(s) PRINTF(s) #else #define DPRINTF(s) #endifNow you can have
DPRINTF(("Debugging statement"));
for
debugging statements! This can be turned on and off using the
-DDEBUG
gcc flag.K
(capital k).(global-set-key [(f1)] (lambda () (interactive) (manual-entry (current-word))))Now you can load up emacs put the cursor on the word in question and press the
F1
key to load up the man page on it. You
can replace the F1 key with anything you wish.
Notice: Please do not replicate or copy these pages and
host them elsewhere. This is to ensure that the latest version can always
be found here.
Disclaimer: The document author has published these pages
with the hope that it may be useful to others. However, the document
author does not guarantee that all information contained on these
webpages are correct or accurate. There is no warranty, expressed or
implied, of merchantability or fitness for any purpose. The author does
not assume any liability or responsibility for the use of the information
contained on these webpages.
If you see an error, please send an email to the address below indicating
the error. Your feedback is greatly appreciated and will help to
continually improve these pages.