<?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">Arguments</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="ch09.html" title="Chapter 9. Scripts"/><link rel="previous" href="ch09.html" title="Chapter 9. Scripts"/><link rel="next" href="ch09s03.html" title="Operators"/></head><body><div xmlns="http://www.w3.org/1999/xhtml" class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Arguments</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch09.html">Prev</a> </td><th width="60%" align="center">Chapter 9. Scripts</th><td width="20%" align="right"> <a accesskey="n" href="ch09s03.html">Next</a></td></tr></table><hr/></div><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="id2830917"/>Arguments</h2></div></div><fake><p xmlns="http://www.w3.org/1999/xhtml">
     Arguments in a clause may be any of the following types:
    </p></fake><div xmlns="http://www.w3.org/1999/xhtml" class="informaltable"><table xmlns="http://www.w3.org/1999/xhtml" border="1"><colgroup xmlns="http://www.w3.org/1999/xhtml"><col xmlns="http://www.w3.org/1999/xhtml"/><col xmlns="http://www.w3.org/1999/xhtml"/><col xmlns="http://www.w3.org/1999/xhtml"/></colgroup><thead><tr xmlns="http://www.w3.org/1999/xhtml"><th align="left"><fake><p xmlns="http://www.w3.org/1999/xhtml">Argument Types</p></fake></th><th align="left"><fake><p xmlns="http://www.w3.org/1999/xhtml">Example</p></fake></th><th align="left"><fake><p xmlns="http://www.w3.org/1999/xhtml">Details</p></fake></th></tr></thead><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml"><td align="left"><fake><p xmlns="http://www.w3.org/1999/xhtml">References to Fields</p></fake></td><td align="left">%[int]</td><td align="left"><fake><p xmlns="http://www.w3.org/1999/xhtml">where [int] is the numeric ID of the field</p></fake></td></tr><tr xmlns="http://www.w3.org/1999/xhtml"><td align="left"><fake><p xmlns="http://www.w3.org/1999/xhtml">Constant Float</p></fake></td><td align="left">3.2</td><td align="left"> </td></tr><tr xmlns="http://www.w3.org/1999/xhtml"><td align="left"><fake><p xmlns="http://www.w3.org/1999/xhtml">Constant Integers</p></fake></td><td align="left">17</td><td align="left"> </td></tr><tr xmlns="http://www.w3.org/1999/xhtml"><td align="left"><fake><p xmlns="http://www.w3.org/1999/xhtml">Constant Strings</p></fake></td><td align="left">Hello</td><td align="left"> </td></tr><tr xmlns="http://www.w3.org/1999/xhtml"><td align="left"><fake><p xmlns="http://www.w3.org/1999/xhtml">Constant Times</p></fake></td><td align="left">20:04</td><td align="left"><fake><p xmlns="http://www.w3.org/1999/xhtml">The format is based on a 24-hour clock of the type hh:mm</p></fake></td></tr><tr xmlns="http://www.w3.org/1999/xhtml"><td align="left"><fake><p xmlns="http://www.w3.org/1999/xhtml">Constant Dates</p></fake></td><td align="left">8/5/68</td><td align="left"><fake><p xmlns="http://www.w3.org/1999/xhtml"/></fake></td></tr><tr xmlns="http://www.w3.org/1999/xhtml"><td align="left"><fake><p xmlns="http://www.w3.org/1999/xhtml">Other Clauses</p></fake></td><td align="left">(+ %0 3)</td><td align="left"><fake><p xmlns="http://www.w3.org/1999/xhtml">Most clauses are acceptable ;)</p></fake></td></tr></tbody></table></div><fake><p xmlns="http://www.w3.org/1999/xhtml">
     Constant floats should be written with the same decimal indicator
     you set in the machine's preferences.  This will either be a comma or a
     period.
    </p></fake><fake><p xmlns="http://www.w3.org/1999/xhtml">
     Constant dates should also be written in the local format you set
     in the machine's preferences.  This format determines what character is
     used to separate parts of the date (e.g., month from day from year) and
     the order in which each part of the date occurs.  The year may be
     written as 2 digits (in which case it will be interpreted as 19xx if
     xx &gt; 30 or 20xx if xx &lt; 30 ).  Alternatively, a four-digit year can be
     supplied to avoid ambiguity.
    </p></fake><fake><p xmlns="http://www.w3.org/1999/xhtml">
     Constant times MUST be written as 24 hour values with the hours
     separated from the minutes by a colon (:).  For example 13:00 is
     1:00pm.  This is necessary to avoid ambiguity with constant floats
     which might otherwise appear in an identical format as a time.
    </p></fake><fake><p xmlns="http://www.w3.org/1999/xhtml">
     When a field reference is used in a script, the type of that
     argument will vary depending on the type of the field it references:
    </p></fake><div xmlns="http://www.w3.org/1999/xhtml" class="variablelist"><p xmlns="http://www.w3.org/1999/xhtml" class="title"><b>Reference Field Type Correspondance</b></p><dl><dt xmlns="http://www.w3.org/1999/xhtml"><span xmlns="http://www.w3.org/1999/xhtml" class="term">Numbers</span></dt><dd xmlns="http://www.w3.org/1999/xhtml"><div xmlns="http://www.w3.org/1999/xhtml" class="informaltable"><table xmlns="http://www.w3.org/1999/xhtml" border="0"><colgroup xmlns="http://www.w3.org/1999/xhtml"><col xmlns="http://www.w3.org/1999/xhtml"/><col xmlns="http://www.w3.org/1999/xhtml"/></colgroup><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml"><td>Float</td><td>Float</td></tr><tr xmlns="http://www.w3.org/1999/xhtml"><td>Integer</td><td>Integer</td></tr><tr xmlns="http://www.w3.org/1999/xhtml"><td>Boolean</td><td>Integer</td></tr></tbody></table></div></dd><dt xmlns="http://www.w3.org/1999/xhtml"><span xmlns="http://www.w3.org/1999/xhtml" class="term">Dates</span></dt><dd xmlns="http://www.w3.org/1999/xhtml"><div xmlns="http://www.w3.org/1999/xhtml" class="informaltable"><table xmlns="http://www.w3.org/1999/xhtml" border="0"><colgroup xmlns="http://www.w3.org/1999/xhtml"><col xmlns="http://www.w3.org/1999/xhtml"/><col xmlns="http://www.w3.org/1999/xhtml"/></colgroup><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml"><td>Date</td><td>Date</td></tr></tbody></table></div></dd><dt xmlns="http://www.w3.org/1999/xhtml"><span xmlns="http://www.w3.org/1999/xhtml" class="term">Times</span></dt><dd xmlns="http://www.w3.org/1999/xhtml"><div xmlns="http://www.w3.org/1999/xhtml" class="informaltable"><table xmlns="http://www.w3.org/1999/xhtml" border="0"><colgroup xmlns="http://www.w3.org/1999/xhtml"><col xmlns="http://www.w3.org/1999/xhtml"/><col xmlns="http://www.w3.org/1999/xhtml"/></colgroup><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml"><td>Time</td><td>Time</td></tr></tbody></table></div></dd><dt xmlns="http://www.w3.org/1999/xhtml"><span xmlns="http://www.w3.org/1999/xhtml" class="term">Strings</span></dt><dd xmlns="http://www.w3.org/1999/xhtml"><fake><p xmlns="http://www.w3.org/1999/xhtml">
        All other field types are treated as Strings.
       </p></fake></dd></dl></div><fake><p xmlns="http://www.w3.org/1999/xhtml">
     This means, for example, that field references to Float, Boolean
     or Integer fields can all be used with standard arithmetic operations
     such as +,-,*,/.  It also means that you can use string operations
     such as string-equality <tt xmlns="http://www.w3.org/1999/xhtml">seq</tt> on List field references.
    </p></fake><fake><p xmlns="http://www.w3.org/1999/xhtml">
     A special case occurs when another Calculated Field is
     referenced.  In this situation, the scripting engine attempts to treat
     the field as whatever type will be returned by the script.  So a
     reference to a Calculated field whose script is <tt xmlns="http://www.w3.org/1999/xhtml">(+ 4 3)</tt> will be
     treated as an integer.
    </p></fake></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="ch09.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch09.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch09s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 9. Scripts </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Operators</td></tr></table></div></body></html>
