FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para CA-Clipper Aca va un ejemplo de SENCILLO #ifndef
Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM
Aca va un ejemplo de SENCILLO #ifndef
Posted: Sat Aug 05, 2006 12:07 PM
Amigos,

Aca he podido crear un ejemplo sencillo en C en donde se puede ver el uso del #ifndef, esto me sirvio para poder hacer compatible la función entre versiones de 16 y 32 bits.

El que quiera modificarla para mejorarla estaría bueno, asi aprendo Vio?

Gracias.

#include "winten.h"
#include "windows.h"

#ifndef __HARBOUR__
   #include "clipapi.h"
#else
   #include "hbapi.h"
#endif

#ifndef __HARBOUR__
   CLIPPER COMANDOCEM( PARAMS )
#else
   HB_FUNC ( COMANDOCEM )
#endif
{
   #ifndef __HARBOUR__
      _retc( "gustavo CLIPPER" );
   #else
      hb_retc( "gustavo HARBOUR" );
   #endif
}
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/

Continue the discussion