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

 
Output of file : EQUAL.PRG contained in archive : NN0305.ZIP
* Function: Equal()
* Author: Tim Wong
* Version: Clipper Summer '87
* Note(s): The function does an absolute comparison of
* two numbers.
*
* Copyright (c) 1989 Nantucket Corporation.

FUNCTION Equal
PRIVATE RetVal && The return value.

IF PCOUNT() = 4
* When numbers 1 and 2, length of the number
* and number of decimal places are passed.

PARAMETERS Num1, Num2, NumLen, DecSpc

IF NumLen > 32 && Forces the 16 significant digits
NumLen = 32 && limit on the conversion.
ENDIF
IF DecSpc > 16
DecSpc = 16
ENDIF

RetVal = IIF(STR(Num1,NumLen,DecSpc) == STR(Num2,NumLen,;
DecSpc),.T.,.F.)
ELSE
PARAMETERS Num1, Num2

* When only numbers 1 and 2 are passed.
RetVal = IIF(STR(Num1,32,16) == STR(Num2,32,16),.T.,.F.)
* Note the truncation of the numbers to 16 significant digits.
ENDIF
RETURN(RetVal)


  3 Responses to “Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : NN0305.ZIP
Filename : EQUAL.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/