home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
291.lha
/
DTM_Host
/
dtm_host.doc
< prev
next >
Wrap
Text File
|
1992-09-02
|
4KB
|
167 lines
DTM Host Documentation
Sep 1, 1989
WHO:
Copyright © 1989 by Donald T. Meyer, Stormgate Software
All Rights Reserved
This function host may be freely distributed via BBS and Freeware
collections on diskette.
Commercial use is with the written consent of Donald T. Meyer only.
Stormgate Software
P.O. Box 383
St. Peters, MO 63376
E-Mail can be sent via the following:
BIX: donmeyer (almost daily)
GEnie: D.MEYER (weekly)
PLINK: Stormgate (weekly)
WHAT:
An ARexx function host.
DESCRIPTION:
This ARexx function host, which is written using my freely distibutable
function host source code (available on various communications services),
contains a variety of functions.
These extend the ARexx language in ways that I have found usefull.
As time goes by, this function host will probably grow.
Some of these are generally usefull, and some (getprefs() comes to mind)
were added for one specific need. Please send me any bugs, comments,
or suggestions that you care to.
TO USE IT:
Merely type "dtm_host" at a CLI, or double-click from WorkBench.
When executed, this function host will detach and run in the background
(if started from a CLI, there is no need to "run" or "runback" it).
It will automaticly add itself to the ARexx library list.
This may be started from either CLI or WorkBench, and the normal stack
size of 4096 is just fine.
Once running, the various functions defined herein are accessible
simply by using them in any ARexx program.
For more information on ARexx Function Hosts, see Chapter 6 in the
ARexx manual.
To remove it, simply type "dtm_host -q" from the CLI, or start it from
the WorkBench again. It will take itself off of the ARexx library
list and remove itself from memory.
LIST OF FUNCTIONS:
DEBUG()
ENDSTRIP()
GETPREFS()
SHORTEN()
STRIP_TO_FILENAME()
TABEXPAND()
**********************************************************
** **
** Function Descriptions **
** **
**********************************************************
----------------------------------------------------------------------
DEBUG()
call debug( "Made it to here!" )
This will display the string either in the CLI this function host
was started from, or, failing that, in a window opened by the report host.
The text will have the ARexx program's name prepended, seperated by a
colon.
This is very usefull (IMHO) for keeping an eye on macros started from
WorkBench applications.
----------------------------------------------------------------------
ENDSTRIP()
newstring = endstrip( string1, string2 )
If 'string1' ends in 'string2' then remove 'string2' from
the original string and return the new shorter string. Main intent
is to strip file extensions (of a known type) easily.
This IS case-sensitive.
----------------------------------------------------------------------
GETPREFS()
prefs = getprefs()
Returns the Preferences structure.
Currently the return is in "binary" format. A possible enhancement
would be to return various Preferences data fields as text.
----------------------------------------------------------------------
SHORTEN()
newstring = shorten( string, n )
Shorten the string by 'n' characters. If the string is less than
or equal to 'n' characters long, an empty string will result.
----------------------------------------------------------------------
STRIP_TO_FILENAME()
filename = strip_to_filename( fully-qualified-filename )
Takes a fully qualified path and filename and returns just
the filename. This function is NOT optimized, it was originally
a quick-and-dirty example.
filename( "df0:tests/startrek" )
returns --> "startrek"
----------------------------------------------------------------------
TABEXPAND()
newstring = tabexpand( string, [n] )
Expand each tab in 'string' to ASCII blanks. Tab expansion defaults
to 8 if 'n' is not specified.
----------------------------------------------------------------------