Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.20
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
groff-base /
html /
[ HOME SHELL ]
Name
Size
Permission
Action
img
[ DIR ]
drwxr-xr-x
mom
[ DIR ]
drwxr-xr-x
pic-1.html
3.37
KB
-rw-r--r--
pic-10.html
13.89
KB
-rw-r--r--
pic-11.html
6.21
KB
-rw-r--r--
pic-12.html
2.36
KB
-rw-r--r--
pic-13.html
4.83
KB
-rw-r--r--
pic-14.html
5.18
KB
-rw-r--r--
pic-15.html
5.47
KB
-rw-r--r--
pic-16.html
4.2
KB
-rw-r--r--
pic-17.html
6.54
KB
-rw-r--r--
pic-18.html
3.83
KB
-rw-r--r--
pic-19.html
1.7
KB
-rw-r--r--
pic-2.html
2.31
KB
-rw-r--r--
pic-20.html
6.1
KB
-rw-r--r--
pic-21.html
26.61
KB
-rw-r--r--
pic-22.html
2.67
KB
-rw-r--r--
pic-23.html
1.74
KB
-rw-r--r--
pic-3.html
7.48
KB
-rw-r--r--
pic-4.html
5.46
KB
-rw-r--r--
pic-5.html
3.16
KB
-rw-r--r--
pic-6.html
11.22
KB
-rw-r--r--
pic-7.html
2.57
KB
-rw-r--r--
pic-8.html
3.32
KB
-rw-r--r--
pic-9.html
4.54
KB
-rw-r--r--
pic.html
6.92
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : pic-14.html
<!-- Creator : groff version 1.22.4 --> <!-- CreationDate: Wed Mar 23 13:56:30 2022 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta name="generator" content="groff -Thtml, see www.gnu.org"> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <meta name="Content-Style" content="text/css"> <style type="text/css"> p { margin-top: 0; margin-bottom: 0; vertical-align: top } pre { margin-top: 0; margin-bottom: 0; vertical-align: top } table { margin-top: 0; margin-bottom: 0; vertical-align: top } h1 { text-align: center } </style> <title>pic-14.html</title> </head> <hr> [ <a href="pic-13.html">prev</a> | <a href="pic-15.html">next</a> | <a href="pic.html">top</a> ] <hr> <h2>14. Macros <a name="14. Macros"></a> </h2> <p style="margin-top: 1em"><font color="#000000">You can define macros in <b>pic</b>, with up to 32 arguments (up to 16 on EBCDIC platforms). This is useful for diagrams with repetitive parts. In conjunction with the scope rules for block composites, it effectively gives you the ability to write functions.</font></p> <p style="margin-top: 1em"><font color="#000000">The syntax is</font></p> <p style="margin-left:10%; margin-top: 1em"><font color="#000000"><b>define</b> <i>name</i> <b>{</b> <i>replacement text</i> <b>}</b></font></p> <p style="margin-top: 1em"><font color="#000000">This defines <i>name</i> as a macro to be replaced by the replacement text (not including the braces). The macro may be called as</font></p> <p style="margin-left:10%; margin-top: 1em"><font color="#000000"><i>name</i><b>(</b><i>arg1, arg2, ... argn</i><b>)</b></font></p> <p style="margin-top: 1em"><font color="#000000">The arguments (if any) are substituted for tokens <b>$1</b>, <b>$2</b> ... <b>$n</b> appearing in the replacement text.</font></p> <p style="margin-top: 1em"><font color="#000000">As an example of macro use, consider this:</font></p> <p style="margin-left:10%; margin-top: 1em"><font color="#000000"><small>.PS <br> # Plot a single jumper in a box, $1 is the on-off state. <br> define jumper { [ <br> shrinkfactor = 0.8; <br> Outer: box invis wid 0.45 ht 1;</small></font></p> <p style="margin-left:10%; margin-top: 1em"><font color="#000000"><small># Count on end ] to reset these <br> boxwid = Outer.wid * shrinkfactor / 2; <br> boxht = Outer.ht * shrinkfactor / 2;</small></font></p> <p style="margin-left:10%; margin-top: 1em"><font color="#000000"><small>box fill (!$1) with .s at center of Outer; <br> box fill ($1) with .n at center of Outer; <br> ] }</small></font></p> <p style="margin-left:10%; margin-top: 1em"><font color="#000000"><small># Plot a block of six jumpers. <br> define jumperblock { <br> jumper($1); <br> jumper($2); <br> jumper($3); <br> jumper($4); <br> jumper($5); <br> jumper($6);</small></font></p> <p style="margin-left:10%; margin-top: 1em"><font color="#000000"><small>jwidth = last [].Outer.wid; <br> jheight = last [].Outer.ht;</small></font></p> <p style="margin-left:10%; margin-top: 1em"><font color="#000000"><small>box with .nw at 6th last [].nw wid 6*jwidth ht jheight;</small></font></p> <p style="margin-left:10%; margin-top: 1em"><font color="#000000"><small># Use {} to avoid changing position from last box draw. <br> # This is necessary so move in any direction works as expected <br> {"Jumpers in state $1$2$3$4$5$6" at last box .s + (0,-0.2);} <br> }</small></font></p> <p style="margin-left:10%; margin-top: 1em"><font color="#000000"><small># Sample macro invocations. <br> jumperblock(1,1,0,0,1,0); <br> move; <br> jumperblock(1,0,1,0,1,1); <br> .PE</small></font></p> <p style="margin-top: 1em"><font color="#000000">It yields the following:</font></p> <p align="center" style="margin-top: 1em"><font color="#000000"><img src="img/pic44.png" alt="Image img/pic44.png"></font></p> <p align="center" style="margin-top: 1em"><font color="#000000">Figure 14-1: Sample use of a macro</font></p> <p style="margin-top: 1em"><font color="#000000">This macro example illustrates how you can combine [], brace grouping, and variable assignment to write true functions.</font></p> <p style="margin-top: 1em"><font color="#000000">One detail the example above does not illustrate is the fact that macro argument parsing is not token-oriented. If you call <b>jumper( 1 )</b>, the value of $1 is <b>" 1 "</b>. You could even call <b>jumper(big string)</b> to give $1 the value <b>"big string"</b>.</font></p> <p style="margin-top: 1em"><font color="#000000">If you want to pass in a coordinate pair, you can avoid getting tripped up by the comma by wrapping the pair in parentheses.</font></p> <p style="margin-top: 1em"><font color="#000000">Macros persist through pictures. To undefine a macro, say <b>undef</b> <i>name</i>; for example,</font></p> <p style="margin-left:10%; margin-top: 1em"><font color="#000000">undef jumper <br> undef jumperblock</font></p> <p style="margin-top: 1em"><font color="#000000">would undefine the two macros in the jumper block example.</font></p> <hr> [ <a href="pic-13.html">prev</a> | <a href="pic-15.html">next</a> | <a href="pic.html">top</a> ] <hr>
Close