The Floyd executables

There is a windowless variation of the PinK executables called Floyd. This are simple programms consisting of the Tcl command language, the ADAMO and DAD library, and a short main program that reads commands from standard input or from a file.
If invoked with no arguments then Floyd runs interactively, reading PinK/Tcl commands from standard input and printing command results and error messages to standard output. It runs until the exit command is invoked or until it reaches end-of-file on its standard input.
If there exists a file .floydrc in the home directory of the user, it will be evaluated as a PinK script just before reading the first command from standard input or from the script.
The Floyd executables come in two flavors: floyd and floydy.
While floyd uses the full featured ADAMO tap library including the complete ZEBRA code, floydy uses only the smalltap library without the ZEBRA drivers which makes the executable much smaller.
A little backdraw of floydy is, that due to the lack of the ZEBRA drivers there are no GAF objects available; however - this makes floydy ideal as an interpreter for DAD client scripts.

Command line syntax

floyd and fludyy have the same command line syntax as tclsh:
floyd [fileName [arg ...]]
If Floyd is invoked with arguments then the first argument is the name of a script file and any additional arguments are made available to the script as variables (see below). Instead of reading commands from standard input Floyd will read PinK commands from the named file and exit when it reaches the end of the file.

The following variables are available in the Floyd script:

Contains a count of the number of arguments (0 if none), not including the name of the script file.
Contains a list whose elements are the arguments, in order, or an empty string if there are no arg arguments.
Contains fileName if it was specified. Otherwise, contains the name by which Floyd was invoked.
Contains 1 if Floyd is running interactively (no fileName was specified and standard input is a terminal-like device), 0 otherwise.

The PinK library

On startup the Floyd executables try to find an additional Tcl autoload library in one of the following directories:
./pinklib, $PINK_LIB, $HERMES_LIB/pinklib and $HERMES_ROOT/lib/pinklib.
The directories are checked in this order. The name of first existing directory will be reported and prepended to the list in auto_path.

Floyd Scripts and the Idle Function

There are two features of the PinK executables that are introduced by the Tk library one wants not easily top give up in the windowless version. This two commands are the after command and the CreateFH method on Dad objects. Hence this two features are implemented in Floyd making it necessary to set Floyd in an idle mode where it reacts on timer and connection events. This idle mode is entered using the floydl function.

 Previous  Up  Next
This page is maintained by; last modification: Aug 14 1995 .