Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : ANOTPO.ZIP
Filename : TESTANOT.PRG
* Author: Skip Moon
* Copyright (c) 1989 by Moon Microsystems
*-----------------------------------------------------------------------------
* Created: 6/2/1989 at 4:13
*
* This C function returns the position in
* the char, num, date, or logical in
* specify a beginning and/or ending range to check.
*
* It returns -1 for illegal params one or two, and defaults to assigning 1 to
*
*
*
* syntax:
* [,
*
*
* I haven't tested it with all possible parameters, so you might want to.
* I hope this is useful to you.
* Sample test
declare ar[10]
ar[01] = "test"
ar[02] = "test"
ar[03] = "test"
ar[04] = "test"
ar[05] = "test"
ar[06] = "test"
ar[07] = "test"
ar[08] = "test"
ar[09] = "test"
ar[10] = "test"
? "This should match an be 0 ==> "+str( anotpos( ar, "test") )
ar[01] = "test"
ar[02] = "test"
ar[03] = "test"
ar[04] = "test"
ar[05] = ""
ar[06] = 5903678
ar[07] = "test"
ar[08] = "hello"
ar[09] = "test"
ar[10] = "test"
? "This should be 5 ==> "+str( anotpos( ar, "test", 2) )
? "This should be 1 ==> "+str( anotpos( ar, 5) )
? "This should be 1 ==> "+str( anotpos( ar, ctod("10/10/89") ))
? "This should be -1 ==> "+str( anotpos( ar, ar ))
? "This should be -1 ==> "+str( anotpos( ar ))
? "This should be 5 ==> "+str( anotpos( ar, "test", 2, 5) )
? "This should be 8 ==> "+str( anotpos( ar, "test", 7, 9) )
? "This should be 8 ==> "+str( anotpos( ar, "test", 8, 8) )
ar[01] = 0
ar[02] = 0
ar[03] = 0
ar[04] = 0
ar[05] = 0
ar[06] = 0
ar[07] = 1
ar[08] = 0
ar[09] = 0
ar[10] = 0
? "This should be 7 ==> "+str( anotpos( ar, 0 ))
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/