Funcion __PPAddRule()

Post Reply
User avatar
Vikthor
Posts: 271
Joined: Fri Oct 07, 2005 5:20 am
Location: México

Funcion __PPAddRule()

Post by Vikthor »

Saludos Foro

Alguien me puede explicar el funcionamiento de la funcion __PPAddRule()

Gracias
Vikthor
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Vikthor,

/*
* preprocess and execute new preprocessor directive
* __PPADDRULE( <pPP>, <cDirective> )
*/

En donde <pPP> es un "nuevo" preprocesador creado con:

/*
* initialize new PP context and return pointer to it.
* __PP_INIT( [<cIncludePath>] [, <cStdChFile> ] )
* when <cStdChFile> is empty string ("") then no default rules are used
* only the dynamically created #defines like __HARBOUR__, __DATE__, __TIME__
*/

__PPADDRULE() te permite añadir nuevas reglas de preprocesado que se usarán cuando compiles una macro
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Vikthor
Posts: 271
Joined: Fri Oct 07, 2005 5:20 am
Location: México

Post by Vikthor »

Antonio :

¿ Es válido que yo pueda hacer esto ?

__PPADDRULE( "#include mi.ch" )

o cúal es la forma correcta de utilizar __PP_INIT()

__PPINIT( "c:\midir\" , "mi.ch" ) <--- ¿ esto es correcto ?

Te agradezco tus comentarios
Last edited by Vikthor on Tue May 08, 2007 4:26 pm, edited 1 time in total.
Vikthor
User avatar
Vikthor
Posts: 271
Joined: Fri Oct 07, 2005 5:20 am
Location: México

Post by Vikthor »

cuándo hago esto :

__PPADDRULE("#include mi.ch")

obtengo el siguiente mensaje de error:

Code: Select all

   Error description: Error PP/23  Unknown result marker <uAction> in #directive

Stack Calls
===========
   Called from:  => __PPADDRULE(0)
Vikthor
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Vikthor,

> o cúal es la forma correcta de utilizar __PP_INIT()

hPP = __PPINIT( "c:\midir" , "mi.ch" )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Vikthor
Posts: 271
Joined: Fri Oct 07, 2005 5:20 am
Location: México

Post by Vikthor »

Antonio Linares wrote:Vikthor,

> o cúal es la forma correcta de utilizar __PP_INIT()

hPP = __PPINIT( "c:\midir" , "mi.ch" )
Y supongo que el valor hpp, lo debo usar __PPADDRULE() ?
Vikthor
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Vikthor,

Si. Y no se añade un #include sino un #xcommand ó similar
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply