| 1 |
|
| 2 |
<HTML> |
| 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 |
<HEAD> |
| 29 |
<TITLE>5.8 Interactive Mode</TITLE> |
| 30 |
<STYLE TYPE="text/css"> <!-- A {text-decoration: none} // --> </STYLE> |
| 31 |
</HEAD> |
| 32 |
<BODY BACKGROUND="binary/background.gif" |
| 33 |
BGCOLOR="#FFFFFF" |
| 34 |
TEXT="#000000" |
| 35 |
VLINK="#660000" |
| 36 |
LINK="#FF0000" |
| 37 |
ALINK="#CC0000"> |
| 38 |
|
| 39 |
<TABLE WIDTH="490"> |
| 40 |
<TR> |
| 41 |
<TD WIDTH="130" VALIGN="top"> |
| 42 |
<IMG SRC="binary/d_clear.gif" ALT="" WIDTH="130" HEIGHT="1"><BR> |
| 43 |
|
| 44 |
<FONT SIZE="2"> |
| 45 |
<BR> |
| 46 |
|
| 47 |
<A HREF="http://www.ross.net/" |
| 48 |
TARGET="rosshome" |
| 49 |
onClick="window.open('','rosshome','location,status,menubar,scrollbars,resizable',false).focus(); return true;" |
| 50 |
> |
| 51 |
<IMG SRC="binary/rossnet_logo.gif" |
| 52 |
WIDTH="64" HEIGHT="32" |
| 53 |
BORDER="0" ALT="RossNet" |
| 54 |
HSPACE="0" VSPACE="1"></A><BR> |
| 55 |
<BR> |
| 56 |
|
| 57 |
<A HREF="../index.shtml" |
| 58 |
TARGET="funnelweb" |
| 59 |
onClick="window.open('','funnelweb','location,status,menubar,scrollbars,resizable',false).focus(); return true;" |
| 60 |
> |
| 61 |
<IMG SRC="binary/linklogo.gif" |
| 62 |
WIDTH="64" HEIGHT="32" |
| 63 |
BORDER="0" ALT="FunnelWeb" |
| 64 |
HSPACE="0" VSPACE="1"></A><BR> |
| 65 |
<BR> |
| 66 |
<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0><TR><TD BGCOLOR="#000000"> |
| 67 |
<A HREF="../reference/index.html" |
| 68 |
TARGET="funnelwebreference" |
| 69 |
onClick="window.open('','funnelwebreference','location,status,menubar,scrollbars,resizable',false).focus(); return true;" |
| 70 |
><FONT COLOR="#FFFFFF"><B>Reference</B></FONT></A><BR> |
| 71 |
<BR> |
| 72 |
<A HREF="../developer/index.html" |
| 73 |
TARGET="funnelwebdeveloper" |
| 74 |
onClick="window.open('','funnelwebdeveloper','location,status,menubar,scrollbars,resizable',false).focus(); return true;" |
| 75 |
><FONT COLOR="#FFFFFF"><B>Developer</B></FONT></A><BR> |
| 76 |
<BR> |
| 77 |
<A HREF="index.html"><FONT COLOR="#FFFFFF"><B>Tutorial</B></FONT></A><BR> |
| 78 |
<A HREF="intro.html"><FONT COLOR="#FFFFFF">1 Introduction</FONT></A><BR> |
| 79 |
<A HREF="macro.html"><FONT COLOR="#FFFFFF">2 Macros</FONT></A><BR> |
| 80 |
<A HREF="type.html"><FONT COLOR="#FFFFFF">3 Typesetting</FONT></A><BR> |
| 81 |
<A HREF="example.html"><FONT COLOR="#FFFFFF">4 Example</FONT></A><BR> |
| 82 |
<A HREF="hints.html"><FONT COLOR="#FFFFFF">5 Hints</FONT></A><BR> |
| 83 |
<A HREF="examples.html"><FONT COLOR="#FFFFFF">6 Examples</FONT></A><BR> |
| 84 |
<A HREF="web.html"><FONT COLOR="#FFFFFF">7 Webmaking</FONT></A><BR> |
| 85 |
|
| 86 |
<BR> |
| 87 |
<A HREF="search.html"><FONT COLOR="#FFFFFF"><B>SEARCH</B></FONT></A><BR> |
| 88 |
</FONT> |
| 89 |
</TD></TR></TABLE> |
| 90 |
|
| 91 |
|
| 92 |
</TD> |
| 93 |
<TD WIDTH="360" VALIGN="top"> |
| 94 |
<FONT SIZE="3"> |
| 95 |
|
| 96 |
|
| 97 |
<A HREF="../reference/index.html"><IMG SRC="binary/title.gif" |
| 98 |
WIDTH="302" HEIGHT="24" |
| 99 |
BORDER="0" ALT="FunnelWeb Tutorial Manual" |
| 100 |
HSPACE="0" VSPACE="0"></A> |
| 101 |
<P><FONT SIZE="5">5.8 Interactive Mode</FONT><BR> |
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
<P>As well as having a command line interface with lots of |
| 106 |
options, FunnelWeb also provides a command language and a |
| 107 |
mode ("interactive mode") in which commands in the |
| 108 |
language can be typed interactively. The FunnelWeb command |
| 109 |
interpreter was created primarily to support regression |
| 110 |
testing, but can also be useful |
| 111 |
to FunnelWeb users. |
| 112 |
|
| 113 |
<P>FunnelWeb's command |
| 114 |
interpreter reads one command |
| 115 |
per line and can read a stream of commands either from a |
| 116 |
text file, or from the console. The interpreter can |
| 117 |
understand over twenty commands. See the |
| 118 |
<A HREF="../reference/index.html" |
| 119 |
TARGET="funnelwebreference" |
| 120 |
onClick="window.open('','funnelwebreference','location,status,menubar,scrollbars,resizable',false).focus(); return true;" |
| 121 |
>FunnelWeb Reference Manual</A> for a full list. However, |
| 122 |
most of them |
| 123 |
were designed to support regression testing and will not be |
| 124 |
of use to the casual user. |
| 125 |
|
| 126 |
<P>The commands that are of greatest use to the casual |
| 127 |
user are: |
| 128 |
|
| 129 |
<P> |
| 130 |
<PRE> |
| 131 |
! - Ignores the whole line. |
| 132 |
EXECUTE fn - Execute the specified file. |
| 133 |
FW options - Invoke FunnelWeb-proper once. |
| 134 |
SET options - Sets options. |
| 135 |
SHOW - Displays current options. |
| 136 |
TRACE ON - Turns command tracing ON. |
| 137 |
QUIT - Quits FunnelWeb. |
| 138 |
</PRE> |
| 139 |
|
| 140 |
<P>To distinguish here between invocations of the |
| 141 |
FunnelWeb program and FunnelWeb runs inside the shell, we |
| 142 |
call the latter <STRONG>FunnelWeb proper</STRONG>. The |
| 143 |
"<TT>FW</TT>" command invokes FunnelWeb proper with the |
| 144 |
specified options which take the same syntax as they do on |
| 145 |
the command line. The only restriction is that none of the |
| 146 |
action options can be turned on except "<TT>+F</TT>" which |
| 147 |
must be turned on. |
| 148 |
|
| 149 |
<P>The "<TT>SET</TT>" command has |
| 150 |
the same syntax as the "<TT>FW</TT>" command except that it |
| 151 |
does not allow <I>any</I> action options to be specified. |
| 152 |
It's sole effect is to set default option values for the |
| 153 |
rest of the run. |
| 154 |
|
| 155 |
<P>The "<TT>SHOW</TT>" command |
| 156 |
displays the current default options. |
| 157 |
|
| 158 |
<P>By default, FunnelWeb does not echo the commands that |
| 159 |
it processes in a script. The "<TT>TRACE |
| 160 |
ON</TT>" command turns on such |
| 161 |
tracing. |
| 162 |
|
| 163 |
<P>These commands can be combined to streamline the use of |
| 164 |
FunnelWeb. For example, you might wish to create a script |
| 165 |
called <SAMP>typeset.fws</SAMP> to process a whole group of |
| 166 |
files. |
| 167 |
|
| 168 |
<P> |
| 169 |
<PRE> |
| 170 |
trace on |
| 171 |
!This script typesets the whole program. |
| 172 |
! Set no listing file, no product files, |
| 173 |
! but specify a documentation file |
| 174 |
! and specify the directory into which |
| 175 |
! it should be placed. |
| 176 |
set -L -O +T/usr/ross/typeset/ |
| 177 |
fw prog1 |
| 178 |
fw prog2 |
| 179 |
fw prog3 |
| 180 |
fw prog4 |
| 181 |
</PRE> |
| 182 |
|
| 183 |
<P>There are a few ways in which this script can be run. |
| 184 |
The simplest is simply to specify it in the "<TT>+X</TT>" |
| 185 |
option of a FunnelWeb invocation. FunnelWeb shellscripts |
| 186 |
default to "<TT><current_directory></TT>" and |
| 187 |
"<TT>.fws</TT>". |
| 188 |
|
| 189 |
<P> |
| 190 |
<PRE> |
| 191 |
fw +xtypeset |
| 192 |
</PRE> |
| 193 |
|
| 194 |
<P>The second alternative is |
| 195 |
to enter interactive mode. |
| 196 |
|
| 197 |
<P> |
| 198 |
<PRE> |
| 199 |
fw +k |
| 200 |
</PRE> |
| 201 |
|
| 202 |
<P>From there, you can execute |
| 203 |
the script using: |
| 204 |
|
| 205 |
<P> |
| 206 |
<PRE> |
| 207 |
execute typeset |
| 208 |
</PRE> |
| 209 |
|
| 210 |
<P>Interactive mode could be very useful to those with |
| 211 |
multiple-window workstations. The user |
| 212 |
could create a window containing an interactive session of |
| 213 |
FunnelWeb, and then switch between windows, editing, and |
| 214 |
executing FunnelWeb proper and other programs. |
| 215 |
|
| 216 |
<P>If you find yourself using the command interpreter a |
| 217 |
lot, be sure to read about the other commands that are |
| 218 |
available in the <A HREF="../reference/index.html" |
| 219 |
TARGET="funnelwebreference" |
| 220 |
onClick="window.open('','funnelwebreference','location,status,menubar,scrollbars,resizable',false).focus(); return true;" |
| 221 |
>FunnelWeb Reference Manual</A>. |
| 222 |
|
| 223 |
|
| 224 |
<P> |
| 225 |
<TABLE WIDTH="100%"> |
| 226 |
<TR> |
| 227 |
<TD ALIGN="left" VALIGN="bottom"><A HREF="hints_efficiency.html"><IMG SRC="binary/fw_left.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Prev"></A></TD> |
| 228 |
<TD ALIGN="center" VALIGN="bottom"><A HREF="hints.html"><IMG SRC="binary/fw_up.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Up"></A></TD> |
| 229 |
<TD ALIGN="right" VALIGN="bottom"><A HREF="hints_default.html"><IMG SRC="binary/fw_right.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Next"></A></TD> |
| 230 |
</TR> |
| 231 |
</TABLE> |
| 232 |
|
| 233 |
|
| 234 |
|
| 235 |
<HR> |
| 236 |
<FONT SIZE="2"> |
| 237 |
<A HREF="mailto:[email protected]">Webmaster</A> |
| 238 |
<A HREF="copyright.html">Copyright © Ross N. Williams 1992,1999. All rights reserved.</A><BR> |
| 239 |
</FONT> |
| 240 |
|
| 241 |
</FONT> |
| 242 |
</TD> |
| 243 |
</TR> |
| 244 |
</TABLE> |
| 245 |
|
| 246 |
|
| 247 |
</BODY> |
| 248 |
|
| 249 |
|
| 250 |
|
| 251 |
|
| 252 |
|
| 253 |
</HTML> |