home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 2 BBS
/
02-BBS.zip
/
sqflo130.zip
/
TEMPLATE.DOC
< prev
Wrap
Text File
|
1995-07-02
|
6KB
|
164 lines
SqFilter & Templates
--------------------
For SqFilter, templates are texts which may contain variable parts. This
variable parts are defined as a function name surrounded by '{' and '}'
characters in the text. The function name may optionnaly be followed by
an argument list enclosed by parenthesis. Here's the syntax for a
template function :
<template_function> : {<function_name>[(<parameters>)]}
where <parameters> is defined as :
<parameters> : <parameter>[,<parameters>]
<parameter> may be one of the following :
<pad> : a number. If positive, the result will be
left-padded to the specified length. If
negative, the result will be right-padded.
Default is no padding.
b|k|m : some numeric results may be given in bytes,
kilobytes or megabytes. The default is bytes.
<disk> : a disk drive letter, optionnaly followed by a
colon. Default is current drive.
Template functions are separated in five groups. Depending on the
template, one or more group(s) of functions are available. Generally
speaking, groups of functions are available for templates where they
make sense. For instance, functions that return informations about the
message currently being written would not make sense in the All Files
Listing (AFL*) templates, while they are usefull in the templates that
describe an answer to Allfix requests (AfxFound*).
G1- File area functions
-------------------
These functions return information related to the relevant file
area. Available in the following templates :
AfxAreaTpl, FStAreaTpl, AFLAreaHdr, AFLAreaFtr.
. {FileAreaTag([<pad>])}
Returns the tagname of the current file area.
Ex : {FileAreaTag(20)} -> ' OS2TOOLS'
. {FileAreaDesc([<pad>])}
Returns the description of the current file area.
Ex : {FileAreaDesc(-20)} -> 'Tools for OS/2 '
. {FileAreaPath([<pad>])}
Returns the path to the current file area's files.
Ex : {FileAreaDesc} -> 'e:\lora\files\os2tools\'
. {FileAreaCount([<pad>])}
Returns the number of files in the current file area.
Ex : {FileAreaCount(5)} -> ' 18'
. {FileAreaSize([<b|k|m>[,<pad>]])}
Returns the sum of the current file area's files' sizes.
Ex : {FileAreaSize} -> '1234567'
{FileAreaSize(k)} -> '1205'
{FileAreaSize(k, 6)} -> ' 1205'
. {FileAreaAvgDate}
Returns the average file date of the current file area's
files. The date format is dependant on the country settings.
Ex : {FileAreaAvgDate} -> '08-07-94'
G2- Message functions
-----------------
These functions return information on the message being
currently generated by SqFilter. They are available in the
following templates :
NFAMsgFtr, FStFtr, StatFtr, AfxFoundHdr, AfxFoundFtr.
. {MsgFirstName([<pad>])}
Returns the first name of the message recipient.
Ex : {MsgFirstName} -> 'Raphaël'
. {MsgLastName([<pad>])}
Returns the last name of the message recipient.
Ex : {MsgLastName(-20)} -> 'Vanney '
. {MsgName([<pad>])}
Returns the full name of the message recipient.
Ex : {MsgLastName()} -> 'Raphaël Vanney'
G3- Message area functions
----------------------
These functions return information on the current message area.
They are available in the following templates :
StatFtr, AfxFoundHdr, AfxFoundFtr, NFAMsgHdr, NFAMsgFtr,
FStAreaTpl, FStFtr.
(none of these functions are currently implemented. Those that may
come : base type, message count...)
G4- List of file areas functions
----------------------------
These functions return information on the list of file areas
being used. They are available in the following templates :
NFAMsgHdr, NFAMsgFtr, (areas defined through NFAScan)
FStFtr, FstAreaTpl, ( " " " FStScan)
AFLFileHdr, AFLAreaHdr, ( " " " AFLScan)
AFLAreaFtr, AFLFileFtr, ( " " " AFLScan)
AfxFoundHdr, AfxFoundFtr. ( " " " AfxScan)
. {AreasFileCount([<pad>])}
Returns the total number of files in the file areas.
Ex : {AreasFileCount} -> '386'
. {AreasFileSize([<k|b|m>[,<pad>]])}
Returns the total size of the files in the file areas.
Ex : {AreasFileSize(m, 3)} -> ' 78'
. {AreasFileAvgDate}
Returns the average file date. The date format is dependant on
the country setting.
Ex: {AreasFileAvgDate} -> '04/10/94'
G5- Miscellaneous functions
-----------------------
These functions are available in all the templates.
. {DiskFree(<disk>[,<b|k|m>[,<pad>]])}
Returns the free space on the specified drive.
Ex : {DiskFree(,k)} -> '20342'
{DiskFree(D:, M)} -> '19'
{DiskFree(c,m,5)} -> ' 79'
. {LocalAddr([<pad>])}
Returns the local address as defined by the 'Address' keyword.
Ex : {LocalAddr} -> '2:320/215.9'
Note
----
I've voluntarily not been too far in this template thing : I much prefer
to hear from you before and do what you think is necessary. What's here
now fulfills my needs <g>.
Do send suggestions to
Internet : rvanney@ibm.net
Fidonet : 2:320/215.9