lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

list implementation


From: Héri Tamás
Subject: list implementation
Date: Mon, 28 Jan 2002 18:47:00 +0100 (CET)

Hello,

I have been dealing with Lout since a year.  However I've
begun writing Lout code only recently. Presently, I don't
understand clearly all the low-level concepts of the
language, so I have some problems. Here comes one:

I decided to implement a simple list formatter.

I wrote this:

export @LI @PLS
def @List
    body @Body
{

    def @PL { @Galley }
    def @PLS { - @PL //1.2vx @PLS }

    def @LI into { @PL&&preceding }
        right x
    { x }

    @PLS                # <---- critical
    @Body
}


The text to format was the following:

@List {
@LI {foo}
@LI {bar}
}

However, in the final printed document nothing appeared.
Finally I've removed the invocation of symbol "@PLS" from
the definition of "@List" (right before the invocation of
@Body), and inserted "@PLS" before ythe first use of
"@LI";

@List {
@PLS
@LI {foo}
@LI {bar}
}


After that, the output was that I expected. Could somebody
explain me the difference?


Thanks.

Tamas Heri


reply via email to

[Prev in Thread] Current Thread [Next in Thread]