Topic: Numeric register into text register? (1 of 2), Read 26 times
Conf: VEDIT Macro Language Support
From: Fritz Heberlein
Date: Sunday, November 18, 2001 09:15 AM

I wonder what's the most efficient method to get the value for Cur_line into a sys() command. So far, i have succeeded with the following fragment, which seems a bit troublesome:

#4=cur_line()
buf_switch(buf_free)
num_ins(#4,nocr)
rcb(99,0,EOL_POS)
buf_quit(ok)
sys("... |@(99) ...")

Is there a more straightforward method to put a numeric value into a text register?

Fritz

 


Topic: Re: Numeric register into text register? (2 of 2), Read 27 times
Conf: VEDIT Macro Language Support
From: Christian Ziemski
Date: Sunday, November 18, 2001 11:15 AM

>I wonder what's the most efficient method to get the value for Cur_line =into a sys() command. So far, i have succeeded with the following =fragment, which seems a bit troublesome:
>
>#4=cur_line()
>buf_switch(buf_free)
>num_ins(#4,nocr)
>rcb(99,0,EOL_POS)
>buf_quit(ok)
>sys("... |@(99) ...")

You can use ITOA(n,r) or Num_Str(n,r).

In your example that is:

ITOA(Cur_Line, 99, LEFT+NOCR)
Sys("... |@(99) ...")


Christian