[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]


Pragma Syntax

Most pragmas have this syntax:


  #pragma option-name on | off | reset

Generally, use on or off to change the option's setting, and then use reset to restore the option's original setting, as shown below:


#pragma profile off
  // If the option Generate Profiler Calls is on,
  // turns it off for these functions.

#include <smallfuncs.h>

#pragma profile reset
  // If the option Generate Profiler Calls was originally on,
  // turns it back on. Otherwise, the option remains off

Suppose that you use #pragma profile on instead of #pragma profile reset. If you later turn off Generate Profiler Calls from the Preference dialog, that pragma turns it on. Using reset ensures that you don't inadvertently change the settings in the Project Settings dialog.


TIP

To catch pragmas that the CodeWarrior C/C++ compiler does not recognized, use pragma warn_illpragma. See also "Catching Illegal Pragmas."

[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: August 17, 2000