jed-users mailing list

[2003 Date Index] [2003 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: Line numbers and Visible Tabs


begin  Günter Milde <milde@xxxxxxxxxxxxxxxxxxxx> wrote:
> public define number_lines ()
> {
>    push_spot;
>    if(is_visible_mark, dup) % leave return-value on stack
>      narrow;
>    eob;
>    variable i = 1, digits = strlen(string(what_line()));

Könnte man hier nicht gemeiner Weise auch schreiben:

   variable i = 1, digits = string( strlen(string(what_line()) ));

>    variable format = ["%0d ", "%1d ", "%2d ", "%3d ", "%4d "];
>    bob;
>    do
>      { bol;
>         insert(sprintf(format[digits], i));

         insert(sprintf("%"+digits+"d", i));

> 	i++;
>      }
>    while (down_1);
>    if (()) % was_visible_mark
>      widen;
>    pop_spot;
> }

Jörg.

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2003 date index] [2003 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]