Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : DUTCH_FN.ZIP
Filename : LENG.C

 
Output of file : LENG.C contained in archive : DUTCH_FN.ZIP
/*********
* Author : Jean-Pierre van Melis, Helmond, The Netherlands
* Compiled : with Microsoft C 5.1 (cl /c /AL /Zl /Oailt /FPa /Gs blank.c)
* Object : can only be used in conjunction with Clipper summer '87
* source : is not tested with earlier versions of Clipper

Jean-Pierre van Melis
Bleriotstraat 2
5703 HT Helmond
The Netherlands
*
* LENG.C
*
* Syntax: LENG( )
* Return: Length of string without trailing blanks
*
*********/

#include "jplib.h"

CLIPPER leng()
{

byte *inp;
int length;
int i = 0;

if ( PCOUNT == 1 && ISCHAR(1))
{
inp = _parc(1);

/* count trailing spaces */
for(length=_parclen(1)-1;inp[length]==SPACEC; length--)
;

if (length > 0) /* if trimmed length is greater than 1 */
while(inp[i]==SPACEC) /* count first spaces */
i++;

_retni(length-i+1);

}
else
_retni(0);


return;
}
/* eof */



  3 Responses to “Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : DUTCH_FN.ZIP
Filename : LENG.C

  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/