Funcion __PPAddRule()

Funcion __PPAddRule()

Postby Vikthor » Tue May 08, 2007 7:50 am

Saludos Foro

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

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

Postby Antonio Linares » Tue May 08, 2007 8:36 am

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
Antonio Linares
Site Admin
 
Posts: 42151
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Vikthor » Tue May 08, 2007 2:27 pm

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

Postby Vikthor » Tue May 08, 2007 4:26 pm

cuándo hago esto :

__PPADDRULE("#include mi.ch")

obtengo el siguiente mensaje de error:

Code: Select all  Expand view  RUN
   Error description: Error PP/23  Unknown result marker <uAction> in #directive

Stack Calls
===========
   Called from:  => __PPADDRULE(0)
Vikthor
User avatar
Vikthor
 
Posts: 271
Joined: Fri Oct 07, 2005 5:20 am
Location: México

Postby Antonio Linares » Tue May 08, 2007 4:28 pm

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
Antonio Linares
Site Admin
 
Posts: 42151
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Vikthor » Tue May 08, 2007 4:31 pm

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
Vikthor
 
Posts: 271
Joined: Fri Oct 07, 2005 5:20 am
Location: México

Postby Antonio Linares » Tue May 08, 2007 4:35 pm

Vikthor,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42151
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 66 guests