Re: [Harbour] Macro to block conversion function

2008-10-15 Thread Szakáts Viktor
Hi Przemek, This problem is also with .hrb files and code compiled by compiler library. Using set of "safe" functions does not resolve the problem fully. It's also necessary to block macro compilation or attach the restriction definitions to macro compiled code so it will be respected during

Re: [Harbour] Macro to block conversion function

2008-10-14 Thread Przemyslaw Czerpak
On Tue, 14 Oct 2008, Szak�ts Viktor wrote: Hi Viktor, >> Yes, hb_macroBlock() is faster. The difference depends on >> macro body. For very simplt macros, f.e. ".T." it's: >> empty loop overhead: 0.09 >> macro compilation: 2.44 >> hb_macroblock: 1.43 >> For more co

Re: [Harbour] Macro to block conversion function

2008-10-14 Thread Szakáts Viktor
Hi Przemek, bBlock := hb_macroCompile( "{||" + cExpr + "}" ) Nothing. Though, we've been talking about this expression: :) bBlock := hb_macroCompile( cExpr ) other than that you have to type more characters. I don't know if there is a speed concern but the first expression is idiomatic for

Re: [Harbour] Macro to block conversion function

2008-10-14 Thread Przemyslaw Czerpak
On Tue, 14 Oct 2008, Szak�ts Viktor wrote: Hi Viktor, >>> I really don't see what's the difference between >> bBlock := &( "{||" + cExpr + "}" ) >> and >> bBlock := hb_macroCompile( "{||" + cExpr + "}" ) > Nothing. Though, we've been talking about this expression: :) > bBlock := hb_macroCompile(

Re: [Harbour] Macro to block conversion function

2008-10-14 Thread Enrico Maria Giordano
-Messaggio Originale- Da: "Szakáts Viktor" <[EMAIL PROTECTED]> A: "Harbour Project Main Developer List." Data invio: martedì 14 ottobre 2008 9.49 Oggetto: Re: [Harbour] Macro to block conversion function Nothing. Though, we've been talking a

Re: [Harbour] Macro to block conversion function

2008-10-14 Thread [EMAIL PROTECTED]
I really don't see what's the difference between bBlock := &( "{||" + cExpr + "}" ) and bBlock := hb_macroCompile( "{||" + cExpr + "}" ) No! if i understand Przemek, the new syntax is : bBlock := hb_macroBlock( cExpr ) and there are only 2 characters more, but easier to type. Guy __

Re: [Harbour] Macro to block conversion function

2008-10-14 Thread Szakáts Viktor
Hi Enrico, I really don't see what's the difference between bBlock := &( "{||" + cExpr + "}" ) and bBlock := hb_macroCompile( "{||" + cExpr + "}" ) Nothing. Though, we've been talking about this expression: :) bBlock := hb_macroCompile( cExpr ) other than that you have to type more char

Re: [Harbour] Macro to block conversion function

2008-10-14 Thread Enrico Maria Giordano
-Messaggio Originale- Da: "Szakáts Viktor" <[EMAIL PROTECTED]> A: "Harbour Project Main Developer List." Data invio: martedì 14 ottobre 2008 1.53 Oggetto: Re: [Harbour] Macro to block conversion function I'm looking for a function replacem

Re: [Harbour] Macro to block conversion function

2008-10-13 Thread Szakáts Viktor
Hi Przemek, Thanks for explaining these details, I didn't know them so far. compilation and overwrite in generated PCODE last instruction changing HB_P_ENDPROC to HB_P_ENDBLOCK. Anyhow there is yet another problem. Macro compiled blocks inherits from current function class scope so if you compi

Re: [Harbour] Macro to block conversion function

2008-10-13 Thread Przemyslaw Czerpak
On Tue, 14 Oct 2008, Szak�ts Viktor wrote: Hi Viktor, > Thanks Massimo, this is almost good, to be more > specific, I'm looking for a function replacement > for this construct: > bBlock := &( "{||" + cExpr + "}" ) Different PCODE is generated for codeblock body ans simple macro, f.e.: cExpr

Re: [Harbour] Macro to block conversion function

2008-10-13 Thread Szakáts Viktor
0 PM To: Harbour Project Main Developer List. Subject: [Harbour] Macro to block conversion function Hi folks, Do we have a function to convert a macro text to a codeblock? This would essentially be the same functionality as we currently have with '&("code")' expression, b

RE: [Harbour] Macro to block conversion function

2008-10-13 Thread Massimo Belgrano
I am not sure but I remember HB_VMEXECUTE(Hb_macroCompile("CODE")) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Szakáts Viktor Sent: Monday, October 13, 2008 4:40 PM To: Harbour Project Main Developer List. Subject: [Harbour] Macro to block

[Harbour] Macro to block conversion function

2008-10-13 Thread Szakáts Viktor
Hi folks, Do we have a function to convert a macro text to a codeblock? This would essentially be the same functionality as we currently have with '&("code")' expression, but in the form of a function. If not, IMO it'd be useful/cleaner to have one, like hb_macroCompile( "code" ) -> bBlock. Brg