| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | text files: truncating, seek backwards for EOL, InStem |
Hello Sarah,
Saturday 21 December 2002 14:21, Sarah Nunez wrote to Eddy Thilleman:
SN> 10 Dec 02 23:48, Eddy Thilleman wrote to All:
ET>> Was the following message sent out?
SN> I didn't get the original. I just now received the resend.
Sorry for the delay, I was two weeks at my parents' place for Christmas and
the new year. :)
I wish for everyone: a healthy and prosperous 2003!
The subject was: text files: truncating, seek backwards for EOL, InStem
/* ---------------- sample code to use InStem ---------------- */
area. = ''
area.0 = 3
area.1 = 'house'
area.2 = 'road'
area.3 = 'map'
if InStem( area., 'house' ) then say 'house is in area'
if InStem( area., 'map' ) then say 'map is in area'
if InStem( area., 'road' ) then say 'road is in area'
if InStem( area., 'car' ) then say 'car is in area'
return
/* function InStem */
InStem: procedure
use arg Stem., text
False = 0
True = 1
n = 0 /* index var */
Found = False
if (Stem.0 > 0) & (strip( text ) "") then
do
do while (n <= Stem.0) & (Found = False)
n = n + 1
Found = (lowercase( Stem.n ) = lowercase( text )) /* case
insensitive comparison */
end /* while Found = False */
end /* Stem and text not empty */
return Found
/* function lowercase */
Lowercase: procedure
parse arg txt
return translate( txt, XRange('a','z'), XRange('A','Z') )
/* ---------------- end of sample code for InStem ---------------- */
The function to seek EOL (backwards or forwards) is in truncate.cmd
Truncate.cmd uses RexxDate.dll for date calculations.
Truncate.cmd uses FileRexx.dll to move files, but this doesn't work. I
don't know why, it just returns 0
(=no error). The filedate of FileRexx.dll is 12 feb 1995, so it's relative old.
1995-02-12 16:20:08 14.225 C:\OS2\DLL\FILEREXX.DLL
My REXX interpreter is Object REXX (REXX 6.00).
1998-05-06 16:31:00 406.496 D:\OS2\DLL\REXX.DLL
1998-07-23 15:54:00 26.171 D:\OS2\DLL\REXXAPI.DLL
1997-03-31 17:35:00 55.531 D:\OS2\DLL\REXXCRT.DLL
1996-08-01 13:53:54 5.686 D:\OS2\DLL\REXXINIT.DLL
1996-07-22 19:33:08 26.989 D:\OS2\DLL\REXXSC.DLL
1996-07-22 19:33:26 34.793 D:\OS2\DLL\REXXSOM.DLL
1997-12-16 13:09:00 28.635 D:\OS2\DLL\REXXUTIL.DLL
1996-07-22 19:33:26 2.752 D:\OS2\DLL\REXXWPS.DLL
Maybe I can find a newer copy, or is there one that does work?
I put truncate.cmd in the next message with subject truncate.cmd
Greetings -=Eddy=-
netmail: 2:280/5003.10 1:261/38.3
email: e.thilleman{at}freeler.nl
e.thilleman{at}hccnet.nl
... Oxymoron: Windows expert!
--- GoldED/2 3.0.1
* Origin: Window Error:01A Operating system shagged. (1:261/38.3)SEEN-BY: 633/267 270 @PATH: 261/38 123/500 106/1 379/1 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.