Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : CLIPC.ZIP
Filename : UP.PRG

 
Output of file : UP.PRG contained in archive : CLIPC.ZIP
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* File: Up.prg
*
* Author: Mark Pfeifer
*
* Compiler: Clipper (tm), Summer '87
*
* Revision:
* 6-Jul-87 initial coding in Autumn '86
* 2-Mar-88 optimization for Summer '87
*
* Copyright: none, placed in the public domain by author
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* func UpEq
*
* syntax: UpEq(,[,,...,])
* where:
* primary string
* ... secondary strings
* returns:
* logical .T. if any of the secondary strings are equal to the
* primary string, logical .F. otherwise. Note: both primary and
* secondary strings are converted to uppercase before comparison.
* In addition, secondary strings are Trimmed.
*
* Examples
* UpEq("Hello","Hel") .T.
* UpEq("Hello","hel") .T.
* UpEq("Hello","hEL ") .T.
* UpEq("Hello","GoodBye","Hi") .F.
* UpEq("Hello","GoodBye","Hi","H") .T.
*

func UpEq
para pStr,p0,p1,p2,p3,p4,p5,p6,p7,p8,p9


priv mMax && Max # of secondary parameter
mMax=PCount()-2 && max number of secondary strings

priv mRet && value to be returned
mRet=.F.

pStr=Upper(pStr) && note that this won't change the passed parameter

priv mCnt,; && loop counter
mPar && secondary parameter being processed

for mCnt = 0 to mMax

mPar=AlphaN(mCnt)

if pStr=Upper(Trim(p&mPar))
mRet=.T.
exit
endif

next mCnt

retu mRet

* end of func UpEq
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


  3 Responses to “Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : CLIPC.ZIP
Filename : UP.PRG

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. 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/