Files
harbour-core/contrib/hbnf/tests/findith.prg
Przemysław Czerpak 96ca3fe470 2014-01-21 20:41 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* Makefile
  * config/*
  * contrib/*
  * doc/*
  * extras/*
  * include/*
  * lib/*
  * package/*
  * src/*
  * tests/*
  * utils/*
    * removed empty lines left after removed '$' + 'Id' + '$' identifiers
2014-01-21 20:41:05 +01:00

20 lines
428 B
Plaintext

#require "hbnf"
PROCEDURE Main( cCk, cStr, nOcc, xCase )
LOCAL nFind
IF PCount() != 4
? "usage: findith cCk cStr nOcc xCase"
ELSE
xCase := iif( xCase == "Y", .T., .F. )
nOcc := Val( nOcc )
? iif( xCase, "Ignoring ", "Observing " ) + "case:"
? cStr
nFind := ft_FindITh( cCk, cStr, nOcc, xCase )
? iif( nFind > 0, Space( nFind - 1 ) + "^", "Not found" )
ENDIF
RETURN