With this syntax is:
Code: Select all
#xcommand MyCmd =>;
a:= 1;;
b:= 2
Code: Select all
a:= 1; b:= 2
Code: Select all
a:= 1
b:= 2
Thanks in advance.
Moderator: Rathinagiri
Code: Select all
#xcommand MyCmd =>;
a:= 1;;
b:= 2
Code: Select all
a:= 1; b:= 2
Code: Select all
a:= 1
b:= 2
Mejor expresado imposible !!!danielmaximiliano wrote:Claudio, cuando se necesita atar con alambre se hace
+1 Cierto !srvet_claudio wrote:Mejor expresado imposible !!!danielmaximiliano wrote:Claudio, cuando se necesita atar con alambre se hace
Yes Pablo, I needed for specific case that two functions of a #command appeared in two separate lines, this is explanation I posted in HB user forum:Pablo César wrote:Tampoco entiendo como seria empleado.
Necesitarias que se dividan en líneas cada comando ?
The problem is that with #xcommand/#xtranslate the preprocessor always generates all the code in the same line of text separated by semicolon, for example.
a; b; c; d; etc.
Consider the following example:
line text n1: a; b; c
line text n2: d
where a, b, c and d are valid functions/sentences of Harbour.
In a debug step by step, the debugger stops at the line n1, then executes all sentences of this line (a, b, c), and after executing the last sentence (c) stops in the line n2, and so I can not make an individual debug of sentences a, b and c.
For individual debug of all sentences, I need that appears in the code:
line text n1: a
line text n2: b
line text n3: c
line text n4: d
My question is, as I do for that:
#xcommand MyCmd => a; b; c
Instead of generating:
line text n1: a; b; c
generates:
line text n1: a
line text n2: b
line text n3: c
Pablo César wrote:Claudio,
Esto StrTran( cText, ";", Chr( 10 ) ) iria substituir el punto y coma por quiebra de linea.
Tambien estas funciones te puedan ayudar:
hb_pp_tokenAdd
hb_pp_tokenAddNext
hb_pp_tokenAddCmdSep
hb_pp_tokenSetValue
hb_pp_pragmaStream
Las vas a encontrar en ppcore.c en el src del pp del core del Harbour.
(https://github.com/harbour/core/blob/ma ... p/ppcore.c)
Asi aLine := hb_ATokens( cLine, ";" ) vas a conseguir colocar facilmente cada comando en vector y lo puedes trabajar con hb_StrShrink(aLine,1).
Por favor prefiero que me escribas en castellano porque yo no te entiendo bien y perdemos mucho tiempo.