groff
[Top][All Lists]
Advanced

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

Re: Pic question


From: Ralph Corderoy
Subject: Re: Pic question
Date: Fri, 02 Dec 2022 09:53:41 +0000

Hi Riza,

> I have a location using a fraction like so "1/3 <A.ne, A.se>".  How can
> I get the x component of that location?
...
>     a = 1/3 <A.ne, A.se>;
>     print a.x;
>
> This fails at the assignment and it says "syntax error before ','"

You're assigning an expression to a variable and ‘n/m <...>’ is
available in expressions as far as I recall.

This should put you on the right track.

    $ cat third.tr
    .PS
    B: box
    A: 1/3 <B.ne, B.se>
    print A
    print A.x
    .PE
    $
    $ pic <third.tr >/dev/null
    0.75, 0.0833333
    0.75
    $

-- 
Cheers, Ralph.



reply via email to

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