Directive #pike


Directive #pike

#pike

Description

Set the Pike compiler backward compatibility level.

This tells the compiler which version of Pike it should attempt to emulate from this point on in the current compilation unit.

This is typically used to "quick-fix" old code to work with more recent versions of Pike.

Example
// This code was written for Pike 7.2, and depends on
  // the old behaviour for 7.2::dirname().
  #pike 7.2

  // ... Code that uses dirname() ...

This directive is also needed for Pike modules that have been installed globally, and might be used by a Pike that has been started with the -V flag.

Example
// Pike modules that are bundled with Pike are
  // typically written for the same version of Pike.
  #pike __REAL_VERSION__