1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844
|
<html>
<head>
<!-- This file has been generated by unroff 1.0, 02/04/02 10:55:10. -->
<!-- Do not edit! -->
<STYLE TYPE="text/css">
<!--
A:link{text-decoration:none}
A:visited{text-decoration:none}
A:active{text-decoration:none}
-->
</STYLE>
<title>ploticus: ploticus scripts</title>
<body bgcolor=D0D0EE vlink=0000FF>
<br>
<br>
<center>
<table cellpadding=2 bgcolor=FFFFFF width=550 ><tr>
<td>
<table cellpadding=2 width=550><tr>
<td><br><h2>Ploticus scripts</h2></td>
<td align=right>
<small>
<a href="../doc/Welcome.html"><img src="../doc/ploticus.gif" border=0></a><br>
<a href="../doc/Welcome.html">Welcome</a>
<a href="../gallery/index.html">Gallery</a>
<a href="../doc/Contents.html">Handbook</a>
<td></tr></table>
</td></tr>
<td>
<br>
<br>
<title>Manual page for Ploticus_scripts(PL)</title>
</head>
<body>
<h2>DESCRIPTION</h2>
<p>
Ploticus is controlled by scripts that a
user creates in a text editor and saves in a file.<tt> </tt>
The scripts can also be created by other programs.<tt> </tt>
Script files should be plain ascii text files, and they
may be named anything, however a file name ending of
<b>.p</b>, <b>.pl</b>, <b>.plo</b>, <b>.pls</b>, <b>.htm</b> or <b>.html</b>
is recommended.<tt> </tt>
<br><br><br>
<h2>EXAMPLE</h2>
Here is an example of a ploticus script:
<pre>
<br><img src="../gallery/sa1.gif"><br>
#proc areadef
rectangle: 1 1 4 2
xrange: 0 5
yrange: 0 100
#proc xaxis:
stubs: text
Africa
Americas
Asia
Europe,\nAustralia,\n Pacific
#proc yaxis
label: Growth Rate
stubs: inc 20
minortics: yes
minorticinc: 5
#proc getdata
data: 76
54
60
59
#proc bars
lenfield: 1
color: teal
barwidth: 0.2
</pre>
<p>
As you can see, this is not low-level 3GL-style code. It is a sort of
hybrid; plotting actions (#procs) are specified in procedural order,
but within each #proc the language is goal-driven (4GL). Thus, traditional
procedural programming skills are not required.<tt> </tt>
<p>
The above Ploticus script invokes a number of procedures (procs).<tt> </tt>
First,
<b>proc areadef</b> to set up a plotting area, then
<b>proc xaxis</b> and <b>yaxis</b> to render the axes.<tt> </tt>
Then <b>proc getdata</b> is invoked to define some data,
and then finally <b>proc bars</b> is invoked to produce a bar graph.<tt> </tt>
<p>
For each proc, the user may specify a various attributes or options.<tt> </tt>
Attributes that are not specified use a default when possible.<tt> </tt>
In the above example, the user has invoked <tt>proc areadef</tt>
and specified values for these attributes: <tt>rectangle</tt>, <tt>xrange</tt>,
and <tt>yrange</tt>.
All of the procs, as well as the names, types, and acceptable
values for all attributes, are described in the
<a href="../doc/Contents.html">
ploticus handbook.<tt> </tt>
</a>
<br><br><br>
<a name=procs></a>
<h2>PROCEDURES (PROCS) AND ATTRIBUTES</h2>
<p>
<b>Procedures (procs)</b> are always invoked using this construct: <tt>#proc </tt><i>procname</i>.<tt> </tt>
The word <tt>#proc</tt> indicates the start of a procedure specification block;
the other word is the name of a procedure (case insensitive).<tt> </tt>
<p>
<b>Attributes</b> within a procedure may be specified in any order.
A colon (<b>:</b>) may be used after an attribute
name or a procedure name (however it is not required).
All proc names and attribute names are case-insensitive.
Attributes that are multiline text type
are terminated by a blank line.<tt> </tt>
<p>
The following script directives are used by ploticus in executing procedures:
<h2>#proc</h2>
<dl>
<dt><dd><p>
This directive signals the beginning of a
<a href="Contents.html#scripts">
ploticus procedure
</a>
(proc).
<br>
Example: <tt>#proc bars</tt>
</dl>
<h2>#endproc</h2>
<dl>
<dt><dd><p>
This may also be written <b>#proc endproc</b>.<tt> </tt>
It is not necessary to use this routinely.<tt> </tt>
<b>#endproc</b> formally signals the end of a ploticus procedure, and
must be used when a proc sets a variable and then
that variable is referenced before the next #proc statement.<tt> </tt>
Examples from the gallery that use <b>#endproc</b> are
<a href="../gallery/lineplot4.htm">
lineplot4
</a>
and
<a href="../gallery/distrib.htm">
distrib
</a>
</dl>
<h2>#procdef</h2>
<dl>
<dt><dd><p>
This directive is used similarly to #proc, but it does not
execute the procedure; it only defines it so that it may
be <b>#clone</b>d later.<tt> </tt>
The procedure should contain a <tt>#saveas</tt>.<tt> </tt>
<br>
Example: <tt>#procdef bars</tt>
</dl>
<h2>#saveas</h2>
<dl>
<dt><dd><p>
Makes the current proc available to be <b>clone</b>d by procs
encountered later in the script, and assigns it an identifier
(B1 in the example below).<tt> </tt>
A gallery example that uses <b>saveas</b> and <b>clone</b> is
<a href="../gallery/rangebar1.htm">
rangebar1
</a>
. May be used anywhere within the proc.<tt> </tt>
<br>
Example: <tt>#saveas B1</tt>
</dl>
<h2>#clone</h2>
<dl>
<dt><dd><p>
<b>clone</b> is used like an attribute.<tt> </tt>
Inherits all attribute values from a previously <b>save</b>d proc.
May be used anywhere within the proc.<tt> </tt>
Attributes may be overridden locally as desired.<tt> </tt>
<br>
Example: <tt>#clone B1</tt>
</dl>
<p>
Other general purpose directives are described below.<tt> </tt>
<a name=syntax></a>
<br><br><br>
<h2>SYNTAX AND VARIABLES</h2>
Any line where the first non-whitespace content is <tt>//</tt> is a <b>comment</b>
and is ignored. Comments must be alone on the line.<tt> </tt>
Any line where the first non-whitespace content begins with <b>#</b> is a
<a href="#directives">
directive
</a>
(an operator that does something).<tt> </tt>
Everything else is generally HTML and is passed through transparently, except for
evaluation of <b>variables</b>, and possible processing of certain
<a href="inlinecodes.html">
inline formatting codes
</a>
.<tt> </tt>
<p>
Double quotes (<b>"</b>) may be used to enclose character strings in
<a href="#set">
set
</a>
,
<a href="#setifnotgiven">
setifnotgiven
</a>
,
<a href="#if">
if, elseif
</a>
and
<a href="#call">
call
</a>
.<tt> </tt>
Everywhere else, quotes have no special syntactical meaning
and may be used freely without any special treatment.<tt> </tt>
It is safe to use <b>TAB</b>s to indent lines of code and in transparent
output; other uses (such as embedding <b>TAB</b> in variable contents) should be avoided.<tt> </tt>
<p>
Scripts
can set and reference <b>variables</b>.<tt> </tt>
Variable names must begin with a letter and may contain
letters, digits, underscore (_) and period (.).<tt> </tt>
Names are case-sensitive.<tt> </tt>
Maximum length of a variable name is 38 characters.<tt> </tt>
Variables may hold numbers, alphanumerics, or single-line text strings,
up to a maximum content length of 250 characters.
Variables cannot hold more than one line of text.<tt> </tt>
All data, including numbers, are stored as characters.<tt> </tt>
Where a variable is to be evaluated,
it should be prefaced with an at-sign (<b>@</b>).<tt> </tt>
In order to print an at-sign a double at sign (@) may be used.<tt> </tt>
When setting or identifying a variable, the at-sign should not be used.<tt> </tt>
Examples:
<pre>
Hello, my name is @NAME
#shell cat data | recsel "@@3 = res"
#set NAME = "Harvey Smith"
</pre>
An attempt to evaluate a variable that has never been assigned a value
will result in cancellation of the evaluation (the variable name will be
passed through transparently) and no error condition will be raised.<tt> </tt>
Several
<a href="variables.html">
reserved variables
</a>
exist. All variables are global in scope.<tt> </tt>
<a name=functions>
<br><br><br>
<h2>FUNCTIONS</h2>
Functions may be used to assign a value to a variable (
<a href="#set">
set
</a>
,
<a href="#setifnotgiven">
setifnotgiven
</a>
), and in
<a href="#if">
if
</a>
statements. Function names always begin with a dollar sign ($), for
example: <tt>$strlen( "hello world" )</tt>.<tt> </tt>
For descriptions of the
available functions, see the
<a href="functions.html">
functions man page
</a>
.<tt> </tt>
There are functions for
<a href="functions.html#ploticus">
plotting
</a>
,
<a href="functions.html#arithmetic">
arithmetic
</a>
,
<a href="functions.html#strings">
strings
</a>
,
<a href="functions.html#commalists">
commalists
</a>
,
<a href="shell.html">
shell
</a>
,
<a href="sql.html">
sql
</a>
,
<a href="functions.html#dates">
dates
</a>
,
<a href="functions.html#times">
times
</a>
, and
<a href="functions.html#misc">
other
</a>
.<tt> </tt>
Custom functions may be implemented in <tt>custom.c</tt>.<tt> </tt>
<a name=directives></a>
<br><br><br>
<h2>MORE DIRECTIVES</h2>
Directives are operators that do something, such as <tt>#set</tt>.<tt> </tt>
Directives always begin with a pound sign (<b>#</b>), and usually occupy one line alone
(a few of the directives, such as
<a href="#shell">
shell
</a>
and
<a href="#sql">
sql
</a>
can be multiline constructs).<tt> </tt>
Individual "words" or tokens within a directive must be separated by white space.<tt> </tt>
Directives may be indented using spaces or tabs.<tt> </tt>
<p>
Descriptions of the flow-of-control directives follow:
<br><br><br>
<a name=set></a>
<h2>#set</h2>
<dl><dt><dd>
<p>
<tt>#set </tt><i>variable</i><tt> = </tt><i>numeric</i>
<br>
<tt>#set </tt><i>variable</i><tt> = "</tt><i>text</i><tt>"</tt>
<br>
<tt>#set </tt><i>variable</i><tt> = $</tt><i>function</i>
<p>
Assigns a value to a <i>variable</i>.<tt> </tt>
The value may be a constant or a variable, and
may be a numeric, alphanumeric/text, or
<a href="functions.html">
function
</a>
result.<tt> </tt>
Alphanumeric/text literals should be enclosed in double quotes (the
closing quote may be omitted if desired).<tt> </tt>
The <i>variable</i> may be a simple standalone variable or a field
in a
<a href="fdf.html">
logical record
</a>
.<tt> </tt>
Whitespace must follow the <tt>#set</tt>, the <i>variable</i>, and the equals sign (=).<tt> </tt>
Multiple alphanumeric variables or constants may be used on the right hand side, resulting
in concatenation, however they must be separated by whitespace.<tt> </tt>
Other directives that can set variables include:
<a href="#setifnotgiven">
setifnotgiven
</a>
,
<a href="#shell">
shell
</a>
,
<a href="#sql">
sql
</a>
,
.<tt> </tt>
Examples:
<p>
<pre>
#set COUNT = 0
#set LABEL = "My favorite martian"
#set LABEL = "My favorite martian
#set LABEL = @A @B
#set LABEL = @A ", " @B
#set TODAY = $todaysdate()
#set TOTAL = $arith(@X+@Y+@Z)
</pre>
</dl>
<a name=setifnotgiven></a>
<h2>#setifnotgiven</h2>
<dl><dt><dd>
<p>
<tt>#setifnotgiven </tt><i>variable</i><tt> = </tt><i>value</i>
<p>
Similar to
<a href="#set">
set
</a>
except that it takes action only if <i>variable</i> is empty ("") or
has never been assigned a value. Useful in assigning a default value to
optional passed variables.<tt> </tt>
<br>
Example: <tt>#setifnotgiven CUTOFF = 0.5</tt>
</dl>
<a name=call></a>
<h2>#call</h2>
<dl><dt><dd>
<p>
<tt>#call </tt><i>function</i>
<p>
Invoke a <i>
<a href="functions.html">
function
</a>
</i> without retaining its return value.
<br>
Example: <tt>#call $setdatefmt( "yyyy-mmm-dd" )</tt>
</dl>
<a name=if></a>
<h2>#if</h2>
<dl><dt><dd>
Alter execution flow of control based on <i>
<a href="condex.html">
conditional expressions
</a>
</i>.
<b>if</b> and <b>endif</b> are required.
<b>elseif</b> and <b>else</b> are optional.<tt> </tt>
An example of an #if construct:
<p>
<pre>
#if @mode = A
<h4>Mode is A</h4>
#elseif @mode = B
<h4>Mode is B</h4>
#else
<h4>Mode not given</h4>
#endif
</pre>
<p>
Variables that have never been assigned are left as is by the script interpreter.<tt> </tt>
This gives intuitively correct results, eg. suppose MODE is unassigned:
<tt>#if @MODE = </tt><i>anything</i> will always be false, and
<tt>#if @MODE != </tt><i>anything</i> will always be true.<tt> </tt>
<a href="#setifnotgiven">
setifnotgiven
</a>
can be used to assign values to optional passed variables.
<p>
Some examples of conditional expressions:
<p>
<pre>
#if @tag = TOTAL
#if @meas > 0.0 && @meas < 8.5
#if @name = ""
#if @type like "west*" || @type = "bl*"
#if $arith(@A+@B) > 10
</pre>
</dl>
<p>
<a name=for></a>
<h2>#for</h2>
<dl><dt><dd>
<tt>#for </tt><i>var</i><tt> in </tt><i>commalist</i>
<br>
..<tt> </tt>
<br>
<tt>#endloop</tt>
<br>
<br>
<tt>#for </tt><i>var</i><tt> across </tt><i>multirow-response</i>
<br>
..<tt> </tt>
<br>
<tt>#endloop</tt>
<p>
Loop the flow of control, iterating across members of
<a href="commalist.html">
commalist
</a>
<i>var</i> will be set to each member from first to last.<tt> </tt>
If <i>commalist</i>
or <i>multirow-response</i>
is empty, the loop body will not be executed.<tt> </tt>
This example illustrates the construct, without doing
anything useful:
<p>
<pre>
#set COLORLIST = "red,blue,green,yellow
#for COLOR in @COLORLIST
#if @COLOR = green
#break
#elseif @COLOR = blue
#continue
#endif
#endloop
</pre>
</dl>
<a name=while></a>
<h2>#while</h2>
<dl><dt><dd>
<tt>#while</tt><tt> </tt><i>conditional expression</i>
<br>
..(loop body)..<tt> </tt>
<br>
<tt>#endloop</tt>
<p>
Loop the flow of control while
<a href="condex.html">
conditional
</a>
is true.<tt> </tt>
If <i>conditional expression</i> is initially false, the loop body
will not be executed at all.<tt> </tt>
The following example loops until I > 10:
<p>
<pre>
#set I = 0
#while @I <= 10
#set I = $arith(@I+1)
#endloop
</pre>
</dl>
<a name=loop></a>
<h2>#loop</h2>
<dl><dt><dd>
<p>
<tt>#loop</tt>
<br>
..<tt> </tt>
<br>
<tt>#endloop</tt>
<p>
Loop the flow of control. A
<a href="#break">
break
</a>
statement must be used to terminate the loop.<tt> </tt>
The following example loops until I > 10:
<p>
<pre>
#set I = 0
#loop
#set I = $arith(@I+1)
#if @I > 10
#break
#endif
#endloop
</pre>
</dl>
<a name=break></a>
<h2>#break</h2>
<dl><dt><dd>
Terminate the iteration of the most recently invoked
<a href="#for">
for
</a>
loop,
<a href="#while">
while
</a>
loop, or plain
<a href="#loop">
loop
</a>
. Script execution resumes at the statement immediately following
the corresponding <b>endloop</b>.<tt> </tt>
There are restrictions if used within an
<a href="#include@_SL01">
included
</a>
file.<tt> </tt>
</dl>
<a name=continue></a>
<h2>#continue</h2>
<dl><dt><dd>
Proceed directly to the next
iteration of the most recently invoked
<a href="#for">
for
</a>
loop,
<a href="#while">
while
</a>
loop, or plain
<a href="#loop">
loop
</a>
.
There are restrictions if used within an
<a href="#include">
included
</a>
file.<tt> </tt>
</dl>
<a name=exit></a>
<h2>#exit</h2>
<dl><dt><dd>
Terminate execution immediately. Example:
<p>
<pre>
#if @_DEBUG = 1
#exit
#endif
</pre>
</dl>
<a name=include></a>
<h2>#include</h2>
<dl><dt><dd>
<tt>#include </tt><i>file</i>
<p>
Include script code from a <i>file</i>.<tt> </tt>
Includes may be nested.<tt> </tt>
<b>include</b>d code is interpreted in the same manner as ordinary code.<tt> </tt>
However,
<a href="#break">
break
</a>
and
<a href="#continue">
continue
</a>
may be used only if the corresponding loop / #endloop is also within
the included file.<tt> </tt>
<a href="#return">
return
</a>
may be used to immediately exit the included file and resume execution
in the including file.<tt> </tt>
<br>
Example: <tt>#include projectheader</tt>
</dl>
<a name=cat></a>
<h2>#cat</h2>
<dl><dt><dd>
<tt>#cat </tt><i>file1</i> [..<i>fileN</i>]
<p>
Copy the contents of <i>file</i>s to the standard output.<tt> </tt>
No processing or interpretation is done to the contents.<tt> </tt>
Suitable for text files or binary files.<tt> </tt>
<br>
Example: <tt>#cat /home/scg/img/banner.gif</tt>
</dl>
<a name=return></a>
<h2>#return</h2>
<dl><dt><dd>
Terminate execution of an
<a href="#include">
included
</a>
file immediately.<tt> </tt>
Execution is resumed at the statement immediately following
the <b>include</b>.<tt> </tt>
</dl>
<a name=write></a>
<h2>#write</h2>
<dl><dt><dd>
<tt>#write </tt><i>file</i><tt> [</tt><i>filemode</i>]
<br>
..<i>text</i>..<tt> </tt>
<br>
<tt>#endwrite</tt> <tt>[noclose]</tt>
<p>
Write <i>text</i> to <i>file</i>.<tt> </tt>
<i>file</i> may be a file name or <tt>stderr</tt> or <tt>stdout</tt>.<tt> </tt>
<i>filemode</i> is either <tt>w</tt> to create, or <tt>a</tt> to append.<tt> </tt>
Within the construct, other directives, such as
<a href="#if">
#if
</a>
,
<a href="#for">
#for
</a>
,
<a href="#include@_SL01">
#include
</a>
and so on may be freely used.<tt> </tt>
If <tt>stdout</tt> or <tt>stderr</tt> are used, the <i>filemode</i> is ignored
and the <tt>noclose</tt> option should be given with #endwrite.<tt> </tt>
<p>
The following example, if used in header code included by
all pages in a cgipal project, would log page hits with date,
time, name of page, and the HTTP info.<tt> </tt>
<p>
<pre>
#set RH = $getenv(HTTP_REMOTE_HOST)
#set RF = $getenv(HTTP_REFERER)
#call $setdatefmt(yyyy/mmm/dd)
#set DATE = $todaysdate()
#set TIME = $time()
#write /tmp/mylog a
@DATE @TIME @_PAGE @RH @RF
#endwrite
</pre>
</dl>
<a name=control></a>
<h2>#control</h2>
<dl><dt><dd>
<tt>#control </tt><i>attribute</i><tt> </tt><i>value</i>
<p>
Set various operational modes.<tt> </tt>
<i>attribute</i> may be one of:
<tt>allowinlinecodes</tt>,
<tt>dbquote</tt>,
<tt>htmlqhmode</tt>,
<tt>listsep</tt>,
<tt>evalvars</tt> ,
<tt>suppressdll</tt>,
or <tt>dot_in_varnames</tt>.<tt> </tt>
<p>
<a href="control.html">
Full description of #control directive
</a>
</dl>
<br><br><br>
<a name=#interaction></a>
<h2>INTERACTION WITH DATABASES AND SHELL</h2>
<a name=sql></a>
<h2>#sql</h2>
<dl><dt><dd>
<tt>#sql [</tt><i>option</i><tt>] </tt><i>sql command</i><tt> [#endsql]</tt>
<p>
This directive allows SQL code to be embedded in scripts, and
submits the embedded SQL code to your database.<tt> </tt>
The <i>sql command</i> may use a single line construct or a
multi-line construct. <tt>#endsql</tt> must be used to terminate
a multi-line construct.<tt> </tt>
For SQL SELECT commands an <i>option</i> may be given; available
options are <tt>#processrows</tt> (the default), <tt>#load</tt>,
<tt>#dump</tt>, <tt>#dumptab</tt>, <tt>#dumphtml</tt>, and <tt>#dumpsilent</tt>.<tt> </tt>
<p>
Two separate SQL database connections are available. For connection 1,
use <b>#sql</b>; for connection 2, use <b>#sql2</b> instead of <b>#sql</b>
(all other syntax is the same).<tt> </tt>
<p>
<a href="sql.html">
More on #sql and interacting with databases
</a>
</dl>
<a name=shell></a>
<h2>#shell</h2>
<dl><dt><dd>
<tt>#shell </tt><i>option</i><tt> </tt><i>command</i><tt> [#endshell]
</tt><p>
Execute the given shell <i>command</i>, and optionally display or
capture the results.<tt> </tt>
The <i>command</i> may use a single line construct or a
multi-line construct. <tt>#endshell</tt> must be used to terminate
a multi-line construct.<tt> </tt>
An <i>option</i> may be given; available
options are <tt>#load</tt>, <tt>#processrows</tt>,
<tt>#dump</tt> (the default), <tt>#dumptab</tt>, <tt>#dumphtml</tt>, and <tt>#dumpsilent</tt>.<tt> </tt>
<p>
<a href="shell.html">
More on #shell and interacting with the shell
</a>
<a name=dataprep></a>
<br>
<br>
</td></tr>
<td align=right>
<a href="Welcome.html">
<img src="../doc/ploticus.gif" border=0></a><br><small>data display engine <br>
<a href="../doc/Copyright.html">Copyright Steve Grubb</a>
<br>
<br>
<center>
<img src="../gallery/all.gif">
</center>
</td></tr>
</table>
</dl>
<p><hr>
Markup created by <em>unroff</em> 1.0, <tt> </tt> <tt> </tt>February 04, 2002.
</body>
</html>
|