<?xml version="1.0" encoding="ISO-8859-1"?>
<html xmlns="http://www.w3.org/1999/xhtml"><head xmlns="http://www.w3.org/1999/xhtml"><title xmlns="http://www.w3.org/1999/xhtml">Chapter 9. Scripts</title><meta xmlns="http://www.w3.org/1999/xhtml" name="generator" content="DocBook XSL Stylesheets V1.50.0"/><link rel="home" href="index.html" title="Pilot-DB Users Manual"/><link rel="up" href="index.html" title="Pilot-DB Users Manual"/><link rel="previous" href="ch08s02.html" title="Database Preferences"/><link rel="next" href="ch09s02.html" title="Arguments"/></head><body><div xmlns="http://www.w3.org/1999/xhtml" class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 9. Scripts</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch08s02.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ch09s02.html">Next</a></td></tr></table><hr/></div><div xmlns="http://www.w3.org/1999/xhtml" class="chapter"><div xmlns="http://www.w3.org/1999/xhtml" class="titlepage"><div xmlns="http://www.w3.org/1999/xhtml"><h2 xmlns="http://www.w3.org/1999/xhtml" class="title"><a xmlns="http://www.w3.org/1999/xhtml" id="script.chapter"/>Chapter 9. Scripts</h2></div></div><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><p xmlns="http://www.w3.org/1999/xhtml"><b>Table of Contents</b></p><dl><dt><a xmlns="http://www.w3.org/1999/xhtml" href="ch09.html#id2830868">Basic Script Construction</a></dt><dt><a xmlns="http://www.w3.org/1999/xhtml" href="ch09s02.html">Arguments</a></dt><dt><a xmlns="http://www.w3.org/1999/xhtml" href="ch09s03.html">Operators</a></dt><dt><a xmlns="http://www.w3.org/1999/xhtml" href="ch09s04.html">Inter-Records scripts</a></dt></dl></div><fake><p xmlns="http://www.w3.org/1999/xhtml">
    Scripts offer a mechanism to perform useful manipulations on
    information stored in the database.  Scripts are generally used to
    calculated new values from information stored in a record or in a set
    of records.  However, their functionality could be used in future
    versions of Pilot-DB to perform other routine tasks such as searching or
    sorting.
   </p></fake><fake><p xmlns="http://www.w3.org/1999/xhtml">
    If you know how to use a simple programming language, have used
    formulas in a spreadsheet, or used an RPN calculator, it should be
    easy to learn how to use scripts and take advantage of all their
    functionality.  Even if the ideas presented in the next few sections
    are completely new to you, it should not take you long to learn how to
    write simple scripts such as those to average two numbers.  With that
    first step taken, more complex expressions will follow.
   </p></fake><div xmlns="http://www.w3.org/1999/xhtml" class="section"><div xmlns="http://www.w3.org/1999/xhtml" class="titlepage"><div xmlns="http://www.w3.org/1999/xhtml"><h2 class="title" style="clear: both"><a xmlns="http://www.w3.org/1999/xhtml" id="id2830868"/>Basic Script Construction</h2></div></div><fake><p xmlns="http://www.w3.org/1999/xhtml">
     Scripts can be used to calculate field values based on the
     contents of other fields in the database.  A script is a LISP-like
     expression containing one or more clauses, each of which takes the form
     of:
    </p></fake><fake><p xmlns="http://www.w3.org/1999/xhtml">
     A script that contains a series of clauses:
    </p></fake><pre xmlns="http://www.w3.org/1999/xhtml" class="screen">([op1] [arg-1] ... [arg-n]) ([op2] [arg-1] ... [arg-2])</pre><fake><p xmlns="http://www.w3.org/1999/xhtml">
     will return the result of the last clause.
    </p></fake></div></div><div xmlns="http://www.w3.org/1999/xhtml" class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch08s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch09s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Database Preferences </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Arguments</td></tr></table></div></body></html>
