|
Post by mueh on May 29, 2019 3:26:05 GMT -5
Hi ! Seems it has to do with UNDERSCORE assigned to label and SPF_CMD . If _ is replaced SPF_CMD assignes label . Hope this saves some Debugging time .
' MULa.MACRO
DIM L AS STRING
DIM LC AS STRING
DIM LN AS number
LN = Get_LNum(Get_Csr_LPtr)
L = REQUEST_LABEL$("."+LN)
L = replace$(L,"_","")
LC = "LINE '" + L + "' ."+LN
SPF_CMD(LC)
' Set_Line(0,LC)
HALT(0, LC+" - "+Get_Msg$)
FUNCTION MB_Call() AS LONG
'----- Clear any transient labels
IF gMacTempVars THEN ' Need temp variables cleanup?
FOR i = 1 TO TP.LastLine ' Must search all lines
IF LEFT$(TP.LLblGet(i), 2) = "._" THEN ' Contain a temporary label?
TP.LLblSet(i, $BlankLNo) ' Clear the line
TP.UpdLControl(i) ' Redo LLCtl
END IF '
NEXT i '
END IF '
is the Code in _BMacro.inc which cleans up TEMPORARY LABEL ( starts with ._) So it Looks like Temporary Labels are only valid within the Macro
|
|
|
Post by George on May 29, 2019 12:04:07 GMT -5
Robert: I try the following and it works fine. Remember temp labels are removed at macro termination.
George
' Try1.macro SPF_TRACE(on) DIM flin AS STRING DIM tlin AS STRING DIM pCmd AS STRING flin = REQUEST_LABEL$(".3") tlin = REQUEST_LABEL$(".5") pCmd = "CUT " + flin + " " + tlin SPF_CMD(pCmd) HALT(0, pCmd)
After the macro runs, the data from .3 to .5 is in the clipboard as expected.
|
|
|
Post by George on May 29, 2019 12:28:24 GMT -5
Why not assign your own permanent labels and track them in global memory.
I'll go review the Doc.
George
|
|