[Top][All Lists]

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

Re: pic doesn't center when i use a macro

From: Tadziu Hoffmann
Subject: Re: pic doesn't center when i use a macro
Date: Tue, 2 Nov 2021 00:38:18 +0100
User-agent: Mutt/1.11.4 (2019-03-13)

> I can do something more manual but i really would like to take advantage
> of the expressivity of pic. Any other comment is also warmly welcome.

It looks like pic has no string variables, and the "if"
works at the statement level, not expression level.

To provide a somewhat constructive answer: do you really
need the "for" loop here?  Perhaps it might also help to
restructure the code, for example like this:


  define mybox {
      s = layer * margin
      box width w height h with .sw at (s,s)
      box width w height margin with .nw at last box .nw dashed $1
      w = w - tr
      h = h - tr
      layer = layer + 1

  w = 3; h = 2; margin = .2; tr = 2 * margin; layer = 0
  mybox("Entête Ethernet")
  mybox("Entête IP")
  mybox("Entête TCP")
  mybox("Donnees applicatives")


reply via email to

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