2012-11-04 21:34 UTC+0100 Viktor Szakats (harbour syenar.net)

* contrib/hbgd/gdwrp.c
  * contrib/hbgd/tests/animgif.prg
  * contrib/hbgd/tests/antialia.prg
  * contrib/hbgd/tests/gdtest.prg
  * contrib/hbgd/tests/test.prg
  * contrib/hbgd/tests/tpoly.prg
    * deprecated GDIMAGEDESTROY() with HB_LEGACY_LEVEL4
    * do not use GDIMAGEDESTROY() in tests (and docs)

  * contrib/hbgt/hbgt.hbx
    * camelcased function names

  * contrib/hbct/doc/en/charlihb.txt
  * contrib/hbct/doc/en/charmix.txt
  * contrib/hbct/doc/en/charop.txt
  * contrib/hbct/doc/en/charophb.txt
  * contrib/hbct/doc/en/ctmath2.txt
  * contrib/hbct/doc/en/dattime3.txt
  * contrib/hbct/doc/en/finan.txt
  * contrib/hbct/doc/en/tab.txt
  * contrib/hbct/doc/en/token1.txt
  * contrib/hbct/doc/en/token2.txt
  * contrib/hbct/doc/en/trig.txt
  * contrib/hbct/doc/en/video.txt
  * contrib/hbgd/doc/en/hbgd.txt
  * contrib/hbgt/doc/en/hbgt.txt
  * contrib/hbmisc/doc/en/ht_dbf.txt
  * contrib/hbmisc/doc/en/ht_doc.txt
  * contrib/hbnf/doc/en/*.txt
  * contrib/hbziparc/doc/en/hbziparc.txt
  * contrib/rddads/doc/en/adsfuncs.txt
    ! hbformatted $EXAMPLES$, $TESTS$ (manual cherry picking
      and additional corrections and fixes)
This commit is contained in:
Viktor Szakats
2012-11-04 20:40:45 +00:00
parent 475dedda9e
commit f085281caa
83 changed files with 822 additions and 1004 deletions

View File

@@ -16,6 +16,41 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-11-04 21:34 UTC+0100 Viktor Szakats (harbour syenar.net)
* contrib/hbgd/gdwrp.c
* contrib/hbgd/tests/animgif.prg
* contrib/hbgd/tests/antialia.prg
* contrib/hbgd/tests/gdtest.prg
* contrib/hbgd/tests/test.prg
* contrib/hbgd/tests/tpoly.prg
* deprecated GDIMAGEDESTROY() with HB_LEGACY_LEVEL4
* do not use GDIMAGEDESTROY() in tests (and docs)
* contrib/hbgt/hbgt.hbx
* camelcased function names
* contrib/hbct/doc/en/charlihb.txt
* contrib/hbct/doc/en/charmix.txt
* contrib/hbct/doc/en/charop.txt
* contrib/hbct/doc/en/charophb.txt
* contrib/hbct/doc/en/ctmath2.txt
* contrib/hbct/doc/en/dattime3.txt
* contrib/hbct/doc/en/finan.txt
* contrib/hbct/doc/en/tab.txt
* contrib/hbct/doc/en/token1.txt
* contrib/hbct/doc/en/token2.txt
* contrib/hbct/doc/en/trig.txt
* contrib/hbct/doc/en/video.txt
* contrib/hbgd/doc/en/hbgd.txt
* contrib/hbgt/doc/en/hbgt.txt
* contrib/hbmisc/doc/en/ht_dbf.txt
* contrib/hbmisc/doc/en/ht_doc.txt
* contrib/hbnf/doc/en/*.txt
* contrib/hbziparc/doc/en/hbziparc.txt
* contrib/rddads/doc/en/adsfuncs.txt
! hbformatted $EXAMPLES$, $TESTS$ (manual cherry picking
and additional corrections and fixes)
2012-11-04 17:48 UTC+0100 Viktor Szakats (harbour syenar.net)
* contrib/hbct/*.[c|h]
* contrib/hbmemio/*.[c|h]

View File

@@ -66,7 +66,7 @@
? charhist( "Hello World !" )[ 109 ] // --> 3 // Chr( 108 ) == "l"
$TESTS$
charhist( "Hello World !" )[ 109 ] == 3
eval( {|| AEval( charhist( "Hello World !" ), {| x | nTotal += x } ), nTotal == Len( "Hello World !" ) }
Eval( {|| AEval( charhist( "Hello World !" ), {| x | nTotal += x } ), nTotal == Len( "Hello World !" ) }
$STATUS$
Ready
$COMPLIANCE$

View File

@@ -35,8 +35,8 @@
$TESTS$
CHARMIX( "ABC", "123" ) == "A1B2C3"
CHARMIX( "ABCDE", "12" ) == "A1B2C1D2E1"
CHARMIX( "AB", "12345") == "A1B2"
CHARMIX( "HELLO", " " ) == "H E L L O "
CHARMIX( "AB", "12345" ) == "A1B2"
CHARMIX( "HELLO", " " ) == "H E L L O "
CHARMIX( "HELLO", "" ) == "HELLO"
$STATUS$
Ready

View File

@@ -126,7 +126,7 @@
the return value can be omitted.
$EXAMPLES$
? charnot( Chr( 85 ) + Chr( 128 ) + Chr( 170 ) + Chr( 1 ) ) // --> Chr( 170 ) + Chr( 127 ) + Chr( 85 ) + Chr( 254 )
? charnot( charnot( "This is a test!" ) ) --> "This is a test!"
? charnot( charnot( "This is a test!" ) ) // --> "This is a test!"
$TESTS$
charnot( Chr( 85 ) + Chr( 128 ) + Chr( 170 ) + Chr( 1 ) ) == Chr( 170 ) + Chr( 127 ) + Chr( 85 ) + Chr( 254 )
charnot( charnot( "This is a test!" ) ) == "This is a test!"

View File

@@ -78,10 +78,12 @@
stored in <cString>, too. By setting the CSETREF()-switch to .T.,
the return value can be omitted.
$EXAMPLES$
? charshl( Chr(1)+Chr(2)+Chr(4)+Chr(8)+Chr(16)+Chr(32)+Chr(64)+Chr(128), 3 )
? charshl( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + ;
Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 )
// --> Chr(8)+Chr(16)+Chr(32)+Chr(64)+Chr(128)+Chr(0)+Chr(0)+Chr(0)
$TESTS$
charshl( Chr(1)+Chr(2)+Chr(4)+Chr(8)+Chr(16)+Chr(32)+Chr(64)+Chr(128), 3 ) == Chr(8)+Chr(16)+Chr(32)+Chr(64)+Chr(128)+Chr(0)+Chr(0)+Chr(0)
charshl( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + ;
Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 ) == Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ) + Chr( 0 ) + Chr( 0 ) + Chr( 0 )
$STATUS$
Ready
$COMPLIANCE$
@@ -124,10 +126,10 @@
stored in <cString>, too. By setting the CSETREF()-switch to .T.,
the return value can be omitted.
$EXAMPLES$
? charshr( Chr(1)+Chr(2)+Chr(4)+Chr(8)+Chr(16)+Chr(32)+Chr(64)+Chr(128), 3 )
? charshr( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 )
// --> Chr(0)+Chr(0)+Chr(0)+Chr(1)+Chr(2)+Chr(4)+Chr(8)+Chr(16)
$TESTS$
charshr( Chr(1)+Chr(2)+Chr(4)+Chr(8)+Chr(16)+Chr(32)+Chr(64)+Chr(128), 3 ) == Chr(0)+Chr(0)+Chr(0)+Chr(1)+Chr(2)+Chr(4)+Chr(8)+Chr(16)
charshr( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 ) == Chr( 0 ) + Chr( 0 ) + Chr( 0 ) + Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 )
$STATUS$
Ready
$COMPLIANCE$
@@ -170,10 +172,10 @@
stored in <cString>, too. By setting the CSETREF()-switch to .T.,
the return value can be omitted.
$EXAMPLES$
? charrll( Chr(1)+Chr(2)+Chr(4)+Chr(8)+Chr(16)+Chr(32)+Chr(64)+Chr(128), 3 )
? charrll( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 )
// --> Chr(8)+Chr(16)+Chr(32)+Chr(64)+Chr(128)+Chr(1)+Chr(2)+Chr(4)
$TESTS$
charrll( Chr(1)+Chr(2)+Chr(4)+Chr(8)+Chr(16)+Chr(32)+Chr(64)+Chr(128), 3 ) == Chr(8)+Chr(16)+Chr(32)+Chr(64)+Chr(128)+Chr(1)+Chr(2)+Chr(4)
charrll( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 ) == Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ) + Chr( 1 ) + Chr( 2 ) + Chr( 4 )
$STATUS$
Ready
$COMPLIANCE$
@@ -216,10 +218,10 @@
stored in <cString>, too. By setting the CSETREF()-switch to .T.,
the return value can be omitted.
$EXAMPLES$
? charrlr( Chr(1)+Chr(2)+Chr(4)+Chr(8)+Chr(16)+Chr(32)+Chr(64)+Chr(128), 3 )
? charrlr( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 )
// --> Chr(32)+Chr(64)+Chr(128)+Chr(1)+Chr(2)+Chr(4)+Chr(8)+Chr(16)
$TESTS$
charrlr( Chr(1)+Chr(2)+Chr(4)+Chr(8)+Chr(16)+Chr(32)+Chr(64)+Chr(128), 3 ) == Chr(32)+Chr(64)+Chr(128)+Chr(1)+Chr(2)+Chr(4)+Chr(8)+Chr(16)
charrlr( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 ) == Chr( 32 ) + Chr( 64 ) + Chr( 128 ) + Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 )
$STATUS$
Ready
$COMPLIANCE$

View File

@@ -129,10 +129,10 @@
i.e. 10^<nLogarithm> == <nNumber>.
$EXAMPLES$
? log10( 10.0 ) // --> 1.0
? log10( sqrt( 10.0 ) ) // --> 0.5
? log10( Sqrt( 10.0 ) ) // --> 0.5
$TESTS$
log10( 10.0 ) == 1.0
log10( sqrt( 10.0 ) ) == 0.5
log10( Sqrt( 10.0 ) ) == 0.5
$STATUS$
Ready
$COMPLIANCE$

View File

@@ -33,11 +33,11 @@
incorrect. The passing of midnight (the time resets to the 0 value)
is taken into account.
$EXAMPLES$
Run a loop for 5 seconds:
// Run a loop for 5 seconds:
WAITPERIOD( 500 ) // Initialization, 5 seconds
DO WHILE <cond1> .AND. <cond2> .AND. WAITPERIOD()
*...
// ...
ENDDO
$TESTS$
@@ -86,20 +86,20 @@
check with TIMEVALID(), then they must be TRIMmed prior to the use of
TIMEVALID() (see following Examples).
$EXAMPLES$
Using the VALID clause with TRIM, all valid times are
accepted, even IF no seconds or minutes are specIFied:
// Using the VALID clause with TRIM, all valid times are
// accepted, even IF no seconds or minutes are specIFied:
cBegin := SPACE( 11 )
cBegin := Space( 11 )
@ 5, 10 SAY "Please input time for beginning work:";
GET cBegin VALID TIMEVALID( RTRIM( cBegin ) )
GET cBegin VALID TIMEVALID( RTrim( cBegin ) )
READ
Using a VALID clause without TRIM, hours and minutes must be
specified, so that TIMEVALID() can confirm a valid time:
// Using a VALID clause without TRIM, hours and minutes must be
// specified, so that TIMEVALID() can confirm a valid time:
cBegin := SPACE( 5 )
cBegin := Space( 5 )
@ 5, 10 SAY "Please input time for beginning work:";
GET cBegin VALID TIMEVALID( cBegin )
GET cBegin VALID TIMEVALID( cBegin )
READ
$TESTS$
@@ -140,8 +140,8 @@
within your application, all files acquire this time with
each write procedure.
$EXAMPLES$
Set the system time in each case; but the hardware clock only
on an AT:
// Set the system time in each case; but the hardware clock only
// on an AT:
cNewTime := "10:20:00"
IF ISAT()
@@ -190,8 +190,8 @@
When you use this FUNCTION to set the system date from within your
application, all files acquire this date with each write procedure.
$EXAMPLES$
Set the system date in each case; but the hardware clock only
on an AT:
// Set the system date in each case; but the hardware clock only
// on an AT:
dNewDate := SToD( "19910730" )
IF ISAT()

View File

@@ -238,7 +238,6 @@
// period (=month) is
? rate( 5172.56, 100, 60 ) // --> 0.005
$TESTS$
rate( 5172.56, 100, 60.0 ) == 0.005
rate( 6000.0, 100, 60.0 ) == 0.0

View File

@@ -32,13 +32,13 @@
$EXAMPLES$
$TESTS$
tabexpand("-"+Chr(9)+"!") == "- !"
tabexpand("----"+Chr(9) +"!") == "---- !"
tabexpand("-"+Chr(9)+"!",, "+") == "-+++++++!"
tabexpand("-"+Chr(9)+ "!", 4) == "- !"
tabexpand("----"+Chr(9)+ "!", 8) == "---- !"
tabexpand("----"+Chr(9)+ "!", 8, "+") == "----++++!"
tabexpand("-"+Chr(9)+"!"+hb_eol()+"----"+Chr(9)+ "!",, "+") == "-+++++++!"+hb_eol()+"----++++!"
tabexpand( "-" + Chr( 9 ) + "!" ) == "- !"
tabexpand( "----" + Chr( 9 ) + "!" ) == "---- !"
tabexpand( "-" + Chr( 9 ) + "!", , "+" ) == "-+++++++!"
tabexpand( "-" + Chr( 9 ) + "!", 4 ) == "- !"
tabexpand( "----" + Chr( 9 ) + "!", 8 ) == "---- !"
tabexpand( "----" + Chr( 9 ) + "!", 8, "+" ) == "----++++!"
tabexpand( "-" + Chr( 9 ) + "!" + hb_eol() + "----" + Chr( 9 ) + "!", , "+" ) == "-+++++++!" + hb_eol() + "----++++!"
$STATUS$
Started
$COMPLIANCE$

View File

@@ -43,8 +43,7 @@
empty tokens, simply look if the character at the returned position
is within the tokenizer list.
$EXAMPLES$
attoken( "Hello, World!" ) // --> 8 // empty strings after tokenizer
// are not a token !
attoken( "Hello, World!" ) // --> 8 (empty strings after tokenizer are not a token !)
$TESTS$
attoken( "Hello, World!" ) == 8
attoken( "Hello, World!",, 2 ) == 8

View File

@@ -64,7 +64,7 @@
// since the string must not be copied
tokeninit() // rewind counter of global TE to 1
tokeninit( "1,2,3", "," , 1 ) // tokenize constant string, store in global TE
tokeninit( cString, , 1, @cTE1) // tokenize cString and store TE in
tokeninit( cString, , 1, @cTE1 ) // tokenize cString and store TE in
// cTE1 only without overriding global TE
tokeninit( cString, , 1, cTE1 ) // tokenize cString and store TE in
// GLOBAL TE since 4th parameter is

View File

@@ -63,7 +63,7 @@
? sin( 1.0 ) // --> 0.8414...
$TESTS$
sin( 0.0 ) == 0.0
sin( PI() / 4 ) == sqrt( 1 / 2 )
sin( PI() / 4 ) == Sqrt( 1 / 2 )
sin( PI() / 2 ) == 1.0
sin( PI() ) == 0.0
$STATUS$
@@ -102,8 +102,8 @@
? cos( 0.0 ) // --> 1.0
? cos( 1.0 ) // --> 0.5403...
$TESTS$
cos( 0.0) == 1.0
cos( PI() / 4 ) == sqrt( 1 / 2 )
cos( 0.0 ) == 1.0
cos( PI() / 4 ) == Sqrt( 1 / 2 )
cos( PI() / 2 ) == 0.0
cos( PI() ) == -1.0
$STATUS$
@@ -222,7 +222,7 @@
? asin( 0.5 ) // --> 0.5235...
$TESTS$
asin( 0.0 ) == 0.0
asin( sqrt( 1 / 2 ) ) == PI() / 4
asin( Sqrt( 1 / 2 ) ) == PI() / 4
asin( 1.0 ) == PI() / 2
asin( 0.0 ) == 0.0 // and not PI(), since the smallest angle is returned !
$STATUS$
@@ -263,7 +263,7 @@
? acos( 0.5 ) // --> 1.04719...
$TESTS$
acos( 0.0 ) == PI() / 2
acos( sqrt( 1 / 2 ) ) == PI() / 4
acos( Sqrt( 1 / 2 ) ) == PI() / 4
acos( 1.0 ) == 0.0
acos( -1.0 ) == PI()
acos( 0.0 ) == PI() / 2 // and not -PI()/2, although cos (-PI()/2) == 0.0 !
@@ -345,11 +345,11 @@
see DTOR() if you need to convert it into degress).
$EXAMPLES$
? atn2( 0.0, 1.0 ) // --> 0.0
? atn2( sqrt( 1 / 2 ), sqrt( 1 / 2 ) ) // --> PI() / 4
? atn2( Sqrt( 1 / 2 ), Sqrt( 1 / 2 ) ) // --> PI() / 4
$TESTS$
atn2( 0.0, 1.0 ) == 0.0
atn2( sqrt( 1 / 2 ), sqrt( 1 / 2 ) ) == PI() / 4
atn2( -sqrt( 1 / 2 ), -sqrt( 1 / 2 ) ) == -3 / 4 * PI() // atan() would return PI() / 4 !
atn2( Sqrt( 1 / 2 ), Sqrt( 1 / 2 ) ) == PI() / 4
atn2( -Sqrt( 1 / 2 ), -Sqrt( 1 / 2 ) ) == -3 / 4 * PI() // atan() would return PI() / 4 !
$STATUS$
Ready
$COMPLIANCE$

View File

@@ -24,6 +24,7 @@
$STATUS$
Started
$COMPLIANCE$
$PLATFORMS$
DJGPP
$FILES$
@@ -63,6 +64,7 @@
$STATUS$
Started
$COMPLIANCE$
$PLATFORMS$
DJGPP
$FILES$
@@ -94,6 +96,7 @@
$STATUS$
Started
$COMPLIANCE$
$PLATFORMS$
DJGPP
$FILES$
@@ -131,6 +134,7 @@
$STATUS$
Started
$COMPLIANCE$
$PLATFORMS$
DJGPP
$FILES$

File diff suppressed because it is too large Load Diff

View File

@@ -717,6 +717,8 @@ HB_FUNC( GDIMAGEGD ) /* original: void gdImageGD(gdImagePtr im, FILE *out) */
}
#if defined( HB_LEGACY_LEVEL4 )
/* - */
/*
@@ -727,6 +729,8 @@ HB_FUNC( GDIMAGEDESTROY ) /* gdImageDestroy(gdImagePtr im) */
{
}
#endif
/* - */
/* - */

View File

@@ -87,10 +87,6 @@ PROCEDURE Main()
gdImageGifAnimEnd( IMAGES_OUT + "anim2.gif" )
/* Close file */
FClose( hFile )
/* Destroy images */
gdImageDestroy( im )
gdImageDestroy( im2 )
gdImageDestroy( im3 )
?
? "Look at " + IMAGES_OUT + " folder for output images"

View File

@@ -66,9 +66,6 @@ PROCEDURE Main()
/* saving the image */
gdImageJpeg( im, IMAGES_OUT + "antialiasedpal.jpg" )
/* Destroy it */
gdImageDestroy( im )
/* ***** DRAW A LINE IN A TRUE COLOR IMAGE ***** */
/* First we create a true color image */
@@ -93,9 +90,6 @@ PROCEDURE Main()
/* saving the image */
gdImageJpeg( im, IMAGES_OUT + "antialiasedtrue.jpg" )
/* Destroy it */
gdImageDestroy( im )
?
? "Look at " + IMAGES_OUT + " folder for output images"
?

View File

@@ -97,10 +97,6 @@ PROCEDURE Main()
gdImagePng( im2, IMAGES_OUT + "conv_tst.png" )
gdImageJpeg( im2, IMAGES_OUT + "conv_tst.jpg" )
/* Destroy images in memory */
gdImageDestroy( im )
gdImageDestroy( im2 )
?
? "Look at " + IMAGES_OUT + " folder for output images"
?

View File

@@ -24,7 +24,4 @@ PROCEDURE Main()
gdImagePng( im2, IMAGES_OUT + "gdtest_squared.png" )
gdImageDestroy( im )
gdImageDestroy( im2 )
RETURN

View File

@@ -86,7 +86,6 @@ PROCEDURE DrawFlake( lOpenPoly )
ENDIF
gdImagePng( gdImage, IMAGES_OUT + cImageName )
gdImageDestroy( gdImage )
RETURN

View File

@@ -29,7 +29,7 @@
same name. I changed the behaviour because some of the strings
I process contain embedded NULs.
$EXAMPLES$
? gt_ascpos("the cat sat on the mat", 3) // prints e
? gt_ascpos( "the cat sat on the mat", 3 ) // prints e
$TESTS$
$STATUS$
@@ -97,8 +97,8 @@
NOTE:
invalid parameters will return -1
$EXAMPLES$
? gt_atDiff("the cat", "the rat") // prints 5
? gt_atDiff("the cat", "the ") // prints 0
? gt_atDiff( "the cat", "the rat" ) // prints 5
? gt_atDiff( "the cat", "the " ) // prints 0
$TESTS$
$STATUS$
@@ -132,7 +132,7 @@
NOTE:
invalid parameters will return ""
$EXAMPLES$
? gt_CharEven("abcdefghijklm") // prints "bdfhjl"
? gt_CharEven( "abcdefghijklm" ) // prints "bdfhjl"
$TESTS$
$STATUS$
@@ -168,9 +168,9 @@
NOTE:
invalid parameters will return ""
$EXAMPLES$
? gt_CharMix("abc", "123") // prints "a1b2c3"
? gt_CharMix("abcde", "123") // prints "a1b2c3de"
? gt_CharMix("abc", "12345") // prints "a1b2c345"
? gt_CharMix( "abc", "123" ) // prints "a1b2c3"
? gt_CharMix( "abcde", "123" ) // prints "a1b2c3de"
? gt_CharMix( "abc", "12345" ) // prints "a1b2c345"
$TESTS$
$STATUS$
@@ -204,7 +204,7 @@
NOTE:
invalid parameters will return ""
$EXAMPLES$
? gt_CharOdd("abcdefghijklm") // prints "acegikm"
? gt_CharOdd( "abcdefghijklm" ) // prints "acegikm"
$TESTS$
$STATUS$
@@ -239,7 +239,7 @@
NOTE:
invalid parameters will return -1
$EXAMPLES$
? GT_ChrCount("t", "the cat sat on the mat") // prints 4
? GT_ChrCount( "t", "the cat sat on the mat" ) // prints 4
$TESTS$
$STATUS$
@@ -272,8 +272,8 @@
Return the ascii value of a character in <cChars>
which appears first in <cStr>.
$EXAMPLES$
? chr(GT_ChrFirst("sa ", "This is a test")) // prints "s"
? chr(GT_ChrFirst("et", "This is a test")) // prints "t"
? Chr( GT_ChrFirst( "sa ", "This is a test" ) ) // prints "s"
? Chr( GT_ChrFirst( "et", "This is a test" ) ) // prints "t"
$TESTS$
$STATUS$
@@ -310,10 +310,10 @@
NOTE:
invalid parameters will return -1
$EXAMPLES$
local cStr1 := "the cat sat on the mat"
LOCAL cStr1 := "the cat sat on the mat"
? GT_ChrTotal("tae", cStr1) // prints 10
? GT_ChrTotal("zqw", cStr1) // prints 0
? GT_ChrTotal( "tae", cStr1 ) // prints 10
? GT_ChrTotal( "zqw", cStr1 ) // prints 0
$TESTS$
$STATUS$
@@ -352,7 +352,7 @@
NOTE:
invalid parameters will return -1
$EXAMPLES$
? GT_StrCount("the", "the cat sat on the mat") // prints 2
? GT_StrCount( "the", "the cat sat on the mat" ) // prints 2
$TESTS$
$STATUS$
@@ -384,8 +384,8 @@
Return the number of characters in the leading segment of a
string that consists solely of characters NOT in the set.
$EXAMPLES$
? GT_strcspn("this is a test", "as ") // prints 3
? GT_strcspn("this is a test", "elnjpq") // prints 11
? GT_strcspn( "this is a test", "as " ) // prints 3
? GT_strcspn( "this is a test", "elnjpq" ) // prints 11
$TESTS$
$STATUS$
@@ -423,8 +423,8 @@
NOTE:
invalid parameters will return ""
$EXAMPLES$
? gt_strDiff("the cat", "the rat") // prints "rat"
? gt_strDiff("the cat", "the ") // prints ""
? gt_strDiff( "the cat", "the rat" ) // prints "rat"
? gt_strDiff( "the cat", "the " ) // prints ""
$TESTS$
$STATUS$
@@ -460,9 +460,9 @@
NOTE:
invalid parameters will return ""
$EXAMPLES$
? gt_strexpand("abc") // prints "a b c"
? gt_strexpand("abc", 2) // prints "a b c"
? gt_strexpand("abc", 2, '|') // prints "a||b||c"
? gt_strexpand( "abc" ) // prints "a b c"
? gt_strexpand( "abc", 2 ) // prints "a b c"
? gt_strexpand( "abc", 2, '|' ) // prints "a||b||c"
$TESTS$
$STATUS$
@@ -498,9 +498,9 @@
If no characters in the the search set are found, the function
shall return 0
$EXAMPLES$
? GT_StrLeft("this is a test", "hsit ") // prints 8
? GT_StrLeft("this is a test", "hit a") // prints 3
? GT_StrLeft("this is a test", "zxy") // prints 0
? GT_StrLeft( "this is a test", "hsit " ) // prints 8
? GT_StrLeft( "this is a test", "hit a" ) // prints 3
? GT_StrLeft( "this is a test", "zxy" ) // prints 0
$TESTS$
$STATUS$
@@ -533,8 +533,8 @@
Return a string after the first occurance of any character from
the input set <cSet>.
$EXAMPLES$
? GT_Strpbrk("This is a test", "sa ") // prints "s is a test"
? GT_Strpbrk("This is a test", "et") // prints "test"
? GT_Strpbrk( "This is a test", "sa " ) // prints "s is a test"
? GT_Strpbrk( "This is a test", "et" ) // prints "test"
$TESTS$
$STATUS$
@@ -570,9 +570,9 @@
If no characters in the the search set are found, the function
shall return 0
$EXAMPLES$
? GT_StrRight("this is a test", "teas ") // prints 8
? GT_StrRight("this is a test", "tes h") // prints 5
? GT_StrRight("this is a test", "zxy") // prints 0
? GT_StrRight( "this is a test", "teas " ) // prints 8
? GT_StrRight( "this is a test", "tes h" ) // prints 5
? GT_StrRight( "this is a test", "zxy" ) // prints 0
$TESTS$
$STATUS$
@@ -609,8 +609,7 @@
may want to allow for future expansion). Each character in the
string returned from GT_NewFlag() will hold 8 logical values.
$EXAMPLES$
cFlags := GT_NewFlag(20) // Create a bit flag string for 20
// logical values.
cFlags := GT_NewFlag( 20 ) // Create a bit flag string for 20 logical values.
$SEEALSO$
GT_SETFLAG() GT_CLRFLAG() GT_ISFLAG()
$END$
@@ -638,20 +637,20 @@
$DESCRIPTION$
GT_SetFlag() is used to turn flags within the flag string on.
$EXAMPLES$
cFlags := GT_NewFlag(20) // Create a bit flag string for 20
// logical values.
cFlags := GT_NewFlag( 20 ) // Create a bit flag string for 20
// logical values.
// Now set flags 10 to 15 to true.
cFlags := GT_SetFlag(cFlags,10,15)
cFlags := GT_SetFlag( cFlags, 10, 15 )
// And set flag 18 to true.
cFlags := GT_SetFlag(cFlags,18)
cFlags := GT_SetFlag( cFlags, 18 )
// And set flag 1 to true.
cFlags := GT_SetFlag(cFlags)
cFlags := GT_SetFlag( cFlags )
$SEEALSO$
GT_NEWFLAG() GT_CLRFLAG() GT_ISFLAG()
$END$
@@ -679,24 +678,24 @@
$DESCRIPTION$
GT_ClrFlag() is used to turn flags within the flag string off.
$EXAMPLES$
cFlags := GT_NewFlag(20) // Create a bit flag string for 20
// logical values.
cFlags := GT_NewFlag( 20 ) // Create a bit flag string for 20
// logical values.
// Now, turn them all on.
cFlags := GT_SetFlag(cFlags,1,20)
cFlags := GT_SetFlag( cFlags, 1, 20 )
// Now set flags 10 to 15 to false.
cFlags := GT_ClrFlag(cFlags,10,15)
cFlags := GT_ClrFlag( cFlags, 10, 15 )
// And set flag 18 to false.
cFlags := GT_ClrFlag(cFlags,18)
cFlags := GT_ClrFlag( cFlags, 18 )
// And set flag 1 to false.
cFlags := GT_ClrFlag(cFlags)
cFlags := GT_ClrFlag( cFlags )
$SEEALSO$
GT_NEWFLAG() GT_SETFLAG() GT_ISFLAG()
$END$
@@ -723,9 +722,9 @@
$EXAMPLES$
// Print the setting of the flags in a flag string called ``cDave''
for nFlag := 1 to (len(cDave)*8)
? "Flag number ",nFlag," == ",GT_IsFlag(cDave,nFlag)
next
FOR nFlag := 1 to ( Len( cDave ) * 8 )
? "Flag number ", nFlag, " == ", GT_IsFlag( cDave, nFlag )
NEXT
$SEEALSO$
GT_NEWFLAG() GT_SETFLAG() GT_CLRFLAG()
$END$

View File

@@ -25,22 +25,22 @@
#command DYNAMIC <fncs,...> => EXTERNAL <fncs>
#endif
DYNAMIC GT_ASCIISUM
DYNAMIC GT_ASCPOS
DYNAMIC GT_ATDIFF
DYNAMIC GT_CHAREVEN
DYNAMIC GT_CHARMIX
DYNAMIC GT_CHARODD
DYNAMIC GT_CHRCOUNT
DYNAMIC GT_CHRFIRST
DYNAMIC GT_CHRTOTAL
DYNAMIC GT_STRCOUNT
DYNAMIC GT_STRCSPN
DYNAMIC GT_STRDIFF
DYNAMIC GT_STREXPAND
DYNAMIC GT_STRLEFT
DYNAMIC GT_STRPBRK
DYNAMIC GT_STRRIGHT
DYNAMIC gt_AsciiSum
DYNAMIC gt_AscPos
DYNAMIC gt_AtDiff
DYNAMIC gt_CharEven
DYNAMIC gt_CharMix
DYNAMIC gt_CharOdd
DYNAMIC gt_ChrCount
DYNAMIC gt_ChrFirst
DYNAMIC gt_ChrTotal
DYNAMIC gt_StrCount
DYNAMIC gt_StrCSPN
DYNAMIC gt_StrDiff
DYNAMIC gt_StrExpand
DYNAMIC gt_StrLeft
DYNAMIC gt_StrPBRK
DYNAMIC gt_StrRight
#if defined( __HBEXTREQ__ ) .OR. defined( __HBEXTERN__HBGT__REQUEST )
#uncommand DYNAMIC <fncs,...> => EXTERNAL <fncs>

View File

@@ -71,7 +71,6 @@
NEXT
USE
RETURN
xed>
$STATUS$
R
$COMPLIANCE$
@@ -109,7 +108,7 @@
NEXT
USE
RETURN
xed>
xed >
$STATUS$
R
$COMPLIANCE$

View File

@@ -40,7 +40,6 @@
oHtm:Close()
RETURN
r>
$STATUS$
R
$COMPLIANCE$

View File

@@ -36,15 +36,15 @@
aList2 := { "apple ", "banana", "PEAR" }
FT_AADDITION( aList1, aList2 )
// ignores spaces, sensitive to case
// returns { "apple", "orange", "pear", "banana", "PEAR" }
// ignores spaces, sensitive to case
// returns { "apple", "orange", "pear", "banana", "PEAR" }
FT_AADDITION( aList1, aList2, , .F. )
// ignores spaces, not sensitive to case
// returns { "apple", "orange", "pear", "banana" }
// ignores spaces, not sensitive to case
// returns { "apple", "orange", "pear", "banana" }
FT_AADDITION( aList1, aList2, .F., .F. )
// sensitive to spaces, not sensitive to case
// returns { "apple", "orange", "pear", "apple ", "banana" }
FT_AADDITION( aList1, aList2, .F. , .F. )
// sensitive to spaces, not sensitive to case
// returns { "apple", "orange", "pear", "apple ", "banana" }
$END$
*/

View File

@@ -35,13 +35,13 @@
FT_AEMAXLEN( aArray, 2 ) // Measure the 2nd dimension of an Array
FT_AEMAXLEN( aArray, 2, , 9 ) // Measure Elements 1-9 of the
2nd dimension or subarray
// 2nd dimension or subarray
FT_AEMAXLEN( aArray, 3, 5, 9 ) // Measure Elements 5-9 of the
3rd dimension or subarray
// 3rd dimension or subarray
FT_AEMAXLEN( aArray, 3, 5 ) // Measure Elements 5 to last in the
3rd dimension or subarray
// 3rd dimension or subarray
$SEEALSO$
FT_AEMINLEN()
$END$

View File

@@ -32,44 +32,43 @@
add and delete rows with the <F7> and <F8> keys,
and pass a UDF with information to edit the individual gets.
$EXAMPLES$
FT_AREDIT(3, 5, 18, 75, ar, @nElem, aHeadings, aBlocks)
FT_AREDIT( 3, 5, 18, 75, ar, @nElem, aHeadings, aBlocks )
This example will allow you to browse a 2 dimensional array
But you can't edit it since there is no GetBlock UDF
It allows the user to hit ENTER to select an element or ESC to
return 0
// This example will allow you to browse a 2 dimensional array
// But you can't edit it since there is no GetBlock UDF
// It allows the user to hit ENTER to select an element or ESC to
// return 0
* This second example shows how to edit a 2 dimensional array
* as might be done to edit an invoice
// This second example shows how to edit a 2 dimensional array
// as might be done to edit an invoice
LOCAL i, ar[ 3, 26 ], aBlocks[ 3 ], aHeadings[ 3 ]
LOCAL nElem := 1, bGetFunc
LOCAL i, ar[ 3, 26 ], aBlocks[ 3 ], aHeadings[ 3 ]
LOCAL nElem := 1, bGetFunc
* Set up two dimensional array "ar"
// Set up two dimensional array "ar"
FOR i := 1 TO 26
ar[ 1, i ] := i // 1 -> 26 Numeric
ar[ 2, i ] := Chr( Asc( "A" ) + i - 1 ) // "A" -> "Z" Character
ar[ 3, i ] := Chr( Asc( "Z" ) - i + 1 ) // "Z" -> "A" Character
NEXT
FOR i := 1 TO 26
ar[ 1, i ] := i // 1 -> 26 Numeric
ar[ 2, i ] := Chr( Asc( "A" ) + i - 1 ) // "A" -> "Z" Character
ar[ 3, i ] := Chr( Asc( "Z" ) - i + 1 ) // "Z" -> "A" Character
NEXT
* SET UP aHeadings Array for column headings
// SET UP aHeadings Array for column headings
aHeadings := { "Numbers", "Letters", "Reverse" }
aHeadings := { "Numbers", "Letters", "Reverse" }
* Need to set up individual array blocks for each TBrowse column
// Need to set up individual array blocks for each TBrowse column
aBlocks[ 1 ] := {|| Str( ar[ 1, nElem ], 2 ) } // prevent default 10 spaces
aBlocks[ 2 ] := {|| ar[ 2, nElem ] }
aBlocks[ 3 ] := {|| ar[ 3, nElem ] }
aBlocks[ 1 ] := {|| Str( ar[ 1, nElem ], 2 ) } // prevent default 10 spaces
aBlocks[ 2 ] := {|| ar[ 2, nElem ] }
aBlocks[ 3 ] := {|| ar[ 3, nElem ] }
* set up TestGet() as the passed Get Function so FT_ArEdit knows how
* to edit the individual gets.
bGetFunc := {| b, ar, nDim, nElem | TestGet( b, ar, nDim, nElem ) }
SetColor( "N/W, W/N, , , W/N" )
CLS
FT_AREDIT( 3, 5, 18, 75, ar, @nElem, aHeadings, aBlocks, bGetFunc )
// set up TestGet() as the passed Get Function so FT_ArEdit knows how
// to edit the individual gets.
bGetFunc := {| b, ar, nDim, nElem | TestGet( b, ar, nDim, nElem ) }
SetColor( "N/W, W/N, , , W/N" )
CLS
FT_AREDIT( 3, 5, 18, 75, ar, @nElem, aHeadings, aBlocks, bGetFunc )
$END$
*/

View File

@@ -29,16 +29,16 @@
are possible with Clipper code. For greater speed, write .c or
.asm versions and use the Clipper Extend system.
$EXAMPLES$
This code would clear bit 4 in a byte represented by Chr( 115 ):
// This code would clear bit 4 in a byte represented by Chr( 115 ):
cNewByte := FT_BITCLR( Chr( 115 ), 4 )
? Asc( cNewbyte ) // result: 99
? cNewByte // result: "c"
cNewByte := FT_BITCLR( Chr( 115 ), 4 )
? Asc( cNewbyte ) // result: 99
? cNewByte // result: "c"
This code would clear bit 5 in the byte represented by letter "A":
// This code would clear bit 5 in the byte represented by letter "A":
FT_BITCLR( "A", 5 ) // result: "A", since
// bit 5 already clear
FT_BITCLR( "A", 5 ) // result: "A", since
// bit 5 already clear
$SEEALSO$
FT_BITSET() FT_ISBIT()
$END$

View File

@@ -29,17 +29,17 @@
are possible with Clipper code. For greater speed, write .c or
.asm versions and use the Clipper Extend system.
$EXAMPLES$
This code would set bit 4 in a byte represented by Chr( 107 ):
// This code would set bit 4 in a byte represented by Chr( 107 ):
cNewbyte := FT_BITSET( Chr( 107 ), 4 )
? Asc( cNewbyte ) // result: 123
? cNewbyte // result: "{"
cNewbyte := FT_BITSET( Chr( 107 ), 4 )
? Asc( cNewbyte ) // result: 123
? cNewbyte // result: "{"
This code would set bit 5 in the byte represented by the letter "A".
// This code would set bit 5 in the byte represented by the letter "A".
? FT_BITSET( "A", 5 ) // result: "a"
// bit 5 set
? FT_BITSET( "A", 5 ) // result: "a"
// bit 5 set
$SEEALSO$
FT_BITCLR() FT_ISBIT()
$END$

View File

@@ -25,7 +25,7 @@
$EXAMPLES$
FT_BLINK( "WAIT", 5, 10 ) // Blinks "WAIT" in current colors @ 5,10
@ 5,10 SAY "WAIT - Printing Report"
@ 5, 10 SAY "WAIT - Printing Report"
FT_BLINK( "..." ) // Blink "..." after wait message...
$END$
*/

View File

@@ -27,15 +27,15 @@
are possible with Clipper code. For greater speed, write .c or
.asm versions and use the Clipper Extend system.
$EXAMPLES$
These three code lines perform a bitwise AND on bytes with values of
Chr(20) and Chr(36), and deliver the result as a string in binary (bit)
format.
// These three code lines perform a bitwise AND on bytes with values of
// Chr( 20 ) and Chr( 36 ), and deliver the result as a string in binary (bit)
// format.
? FT_BYT2BIT( Chr( 20 ) ) // byte1: '0001 0100'
? FT_BYT2BIT( Chr( 36 ) ) // byte2: '0010 0100'
? FT_BYT2BIT( Chr( 20 ) ) // byte1: '0001 0100'
? FT_BYT2BIT( Chr( 36 ) ) // byte2: '0010 0100'
? FT_BYT2BIT( FT_BYTEAND( Chr( 20 ), Chr( 36 ) ) )
// result: '0000 0100'
? FT_BYT2BIT( FT_BYTEAND( Chr( 20 ), Chr( 36 ) ) )
// result: '0000 0100'
$SEEALSO$
FT_BYT2HEX()
$END$

View File

@@ -24,15 +24,15 @@
are possible with Clipper code. For greater speed, write .c or
.asm versions and use the Clipper Extend system.
$EXAMPLES$
These three code lines perform a bitwise AND on bytes with values of
Chr(20) and Chr(36), and deliver the result as a string in hexadecimal
format, using 'h' to signify hexadecimal.
// These three code lines perform a bitwise AND on bytes with values of
// Chr( 20 ) and Chr( 36 ), and deliver the result as a string in hexadecimal
// format, using 'h' to signify hexadecimal.
? FT_BYT2HEX( Chr( 20 ) ) // byte1: '14h'
? FT_BYT2HEX( Chr( 36 ) ) // byte2: '24h'
? FT_BYT2HEX( Chr( 20 ) ) // byte1: '14h'
? FT_BYT2HEX( Chr( 36 ) ) // byte2: '24h'
? FT_BYT2HEX( FT_BYTEAND( Chr( 20 ), Chr( 36 ) ) )
// result: '04h'
? FT_BYT2HEX( FT_BYTEAND( Chr( 20 ), Chr( 36 ) ) )
// result: '04h'
$SEEALSO$
FT_BYT2BIT()
$END$

View File

@@ -26,13 +26,13 @@
are possible with Clipper code. For greater speed, write .c or
.asm versions and use the Clipper Extend system.
$EXAMPLES$
This code would mask out the high nibble (four most significant bits)
of the byte represented by Chr(123) and leave the low nibble bits as in
the parameter byte.
// This code would mask out the high nibble (four most significant bits)
// of the byte represented by Chr(123) and leave the low nibble bits as in
// the parameter byte.
cNewbyte := FT_BYTEAND( Chr( 123 ), Chr( 15 ) )
? Asc( cNewByte ) // result: 11
? cNewByte // result: non-printable character
cNewbyte := FT_BYTEAND( Chr( 123 ), Chr( 15 ) )
? Asc( cNewByte ) // result: 11
? cNewByte // result: non-printable character
$SEEALSO$
FT_BYTEOR() FT_BYTEXOR() FT_BYTENOT() FT_BYTENEG()
$END$

View File

@@ -27,10 +27,10 @@
are possible with Clipper code. For greater speed, write .c or
.asm versions and use the Clipper Extend system.
$EXAMPLES$
This code performs a bit-wise NEG on byte represented by Chr( 32 ):
// This code performs a bit-wise NEG on byte represented by Chr( 32 ):
cNewByte := FT_BYTENOT( Chr( 32 ) )
? Asc( cNewByte ) // result: 224
cNewByte := FT_BYTENOT( Chr( 32 ) )
? Asc( cNewByte ) // result: 224
$SEEALSO$
FT_BYTEOR() FT_BYTEXOR() FT_BYTENOT() FT_BYTEAND()
$END$

View File

@@ -27,10 +27,10 @@
are possible with Clipper code. For greater speed, write .c or
.asm versions and use the Clipper Extend system.
$EXAMPLES$
This code performs a bitwise NOT on byte represented by Chr( 32 ):
// This code performs a bitwise NOT on byte represented by Chr( 32 ):
cNewByte := FT_BYTENOT( Chr( 32 ) )
? Asc( cNewByte ) // result: 223
cNewByte := FT_BYTENOT( Chr( 32 ) )
? Asc( cNewByte ) // result: 223
$SEEALSO$
FT_BYTEOR() FT_BYTEXOR() FT_BYTENEG() FT_BYTEAND()
$END$

View File

@@ -26,8 +26,8 @@
are possible with Clipper code. For greater speed, write .c or
.asm versions and use the Clipper Extend system.
$EXAMPLES$
This code performs a bit-wise OR on two bytes represented
by Chr( 20 ) and Chr( 10 ):
// This code performs a bit-wise OR on two bytes represented
// by Chr( 20 ) and Chr( 10 ):
cNewByte := FT_BYTEOR( Chr( 20 ), Chr( 10 ) )
? Asc( cNewByte ) // result: 30

View File

@@ -26,12 +26,12 @@
are possible with Clipper code. For greater speed, write .c or
.asm versions and use the Clipper Extend system.
$EXAMPLES$
This code performs a bit-wise XOR on two bytes represented
by Chr( 32 ) and Chr( 55 ):
// This code performs a bit-wise XOR on two bytes represented
// by Chr( 32 ) and Chr( 55 ):
cNewByte := FT_BYTEXOR( Chr( 32 ), Chr( 55 ) )
? Asc( cNewByte ) // result: 23
? cNewByte // result: non-printable character
cNewByte := FT_BYTEXOR( Chr( 32 ), Chr( 55 ) )
? Asc( cNewByte ) // result: 23
? cNewByte // result: non-printable character
$SEEALSO$
FT_BYTEOR() FT_BYTENOT() FT_BYTENEG() FT_BYTEAND()
$END$

View File

@@ -66,7 +66,6 @@
? aRetVal[ 6 ] // Result: Saturday
? aRetVal[ 7 ] // Result: 110
? aRetVal[ 8 ] // Result: 12:45:20
$SEEALSO$
FT_DAYOFYR()

View File

@@ -99,8 +99,8 @@
it might be useful. cpmiInt86() is part of the CPMI API. See the
CPMI documentation for more information.
$EXAMPLES$
* This example shows how to call the DOS "create file" service. Take
* special note of how to set up string parameters.
// This example shows how to call the DOS "create file" service. Take
// special note of how to set up string parameters.
#include "ftint86.ch"
@@ -108,17 +108,17 @@
aRegs[ AX ] := makehi( 60 ) // DOS service, create file
aRegs[ CX ] := 0 // Specify file attribute
* Pay attention here, this is crucial. Note how to set up the string
* so it appears in DS:DX.
// Pay attention here, this is crucial. Note how to set up the string
// so it appears in DS:DX.
aRegs[ DS ] := "C:\misc\myfile.xxx"
aRegs[ DX ] := REG_DS
FT_INT86( 33, aRegs ) // Make the call to the DOS interrupt
* This example shows how to call the DOS "get current directory"
* service. This one also uses a string parameter, but note that it
* uses a different offset register.
// This example shows how to call the DOS "get current directory"
// service. This one also uses a string parameter, but note that it
// uses a different offset register.
#include "ftint86.ch"
@@ -126,8 +126,8 @@
aRegs[ AX ] := makehi( 71 )
aRegs[ DX ] := 0 // Choose default drive
* This service requires a 64-byte buffer whose address is in DS:SI. DOS
* will fill the buffer with the current directory.
// This service requires a 64-byte buffer whose address is in DS:SI. DOS
// will fill the buffer with the current directory.
aRegs[ DS ] := Space( 64 )
aRegs[ SI ] := REG_DS
@@ -137,8 +137,8 @@
* For the sake of completeness, here's an example that doesn't use a
* string. This one changes the video mode.
// For the sake of completeness, here's an example that doesn't use a
// string. This one changes the video mode.
#include "ftint86.ch"

View File

@@ -79,23 +79,22 @@
LOCAL lColour := IsColor()
LOCAL cChr := Chr( 254 ) + Chr( 254 )
SET SCOREBOARD Off
SETBLINK( .F. ) // Allow bright backgrounds
SET SCOREBOARD OFF
SetBlink( .F. ) // Allow bright backgrounds
*.... a typical application might have the following different settings
* normally these would be stored in a .dbf/.dbv
aClrs := {;
{ "Desktop", "N/BG", "D", "▒" }, ;
{ "Title", "N/W", "T" }, ;
{ "Top Menu", "N/BG,N/W,W+/BG,W+/N,GR+/N", "M" }, ;
{ "Sub Menu", "W+/N*,GR+/N*,GR+/N*,W+/R,G+/R","M" }, ;
{ "Standard Gets", "W/B, W+/N,,, W/N", "G" }, ;
{ "Nested Gets", "N/BG, W+/N,,, W/N", "G" }, ;
{ "Help", "N/G, W+/N,,, W/N", "W" }, ;
{ "Error Messages", "W+/R*,N/GR*,,,N/R*", "W" }, ;
{ "Database Query", "N/BG, N/GR*,,,N+/BG", "B" }, ;
{ "Pick List", "N/GR*,W+/B,,, BG/GR*", "A" } ;
}
// .... a typical application might have the following different settings
// normally these would be stored in a .dbf/.dbv
aClrs := { ;
{ "Desktop", "N/BG", "D", "▒" }, ;
{ "Title", "N/W", "T" }, ;
{ "Top Menu", "N/BG,N/W,W+/BG,W+/N,GR+/N", "M" }, ;
{ "Sub Menu", "W+/N*,GR+/N*,GR+/N*,W+/R,G+/R", "M" }, ;
{ "Standard Gets", "W/B, W+/N,,, W/N", "G" }, ;
{ "Nested Gets", "N/BG, W+/N,,, W/N", "G" }, ;
{ "Help", "N/G, W+/N,,, W/N", "W" }, ;
{ "Error Messages", "W+/R*,N/GR*,,,N/R*", "W" }, ;
{ "Database Query", "N/BG, N/GR*,,,N+/BG", "B" }, ;
{ "Pick List", "N/GR*,W+/B,,, BG/GR*", "A" } }
aClrs := FT_ClrSel( aClrs, lColour, cChr )
$END$

View File

@@ -20,9 +20,9 @@
the Ctrl key is pressed, such as during a MemoEdit().
$EXAMPLES$
IF FT_CTRL()
@ 24, 0 say "Ctrl"
@ 24, 0 SAY "Ctrl"
ELSE
@ 24, 0 say " "
@ 24, 0 SAY " "
ENDIF
$SEEALSO$
FT_CAPLOCK() FT_NUMLOCK() FT_PRTSCR() FT_SHIFT() FT_ALT()

View File

@@ -24,11 +24,11 @@
a string representing the equivalent in scientific
notation is returned.
$EXAMPLES$
? FT_D2E( 12.345, 2 ) -> 1.23E1
? FT_D2E( 12.345, 2 ) // -> 1.23E1
? FT_D2E( -12.345, 3 ) -> -1.235E1
? FT_D2E( -12.345, 3 ) // -> -1.235E1
? FT_D2E( 0.00000543, 2 ) -> 5.43E-6
? FT_D2E( 0.00000543, 2 ) // -> 5.43E-6
$SEEALSO$
FT_E2D()
$END$

View File

@@ -25,14 +25,14 @@
$EXAMPLES$
dDate := SToD( "19900915" )
? DOW( dDate ) // 7
? CDOW( dDate ) // Saturday
? DoW( dDate ) // 7
? CDoW( dDate ) // Saturday
? FT_DAYTOBOW( dDate ) // 6
// change beginning of week to Friday (yeah!)
FT_DATECNFG( , 6 )
? DOW( dDate ) // 7
? CDOW( dDate ) // Saturday
? DoW( dDate ) // 7
? CDoW( dDate ) // Saturday
? FT_DAYTOBOW( dDate ) // 1
$SEEALSO$
FT_DATECNFG() FT_ACCTWEEK() FT_WEEK()

View File

@@ -42,8 +42,8 @@
$EXAMPLES$
@ 4, 9 TO 11, 71
FT_DFSETUP( "test.txt", 5, 10, 10, 70, 1, 7, 15,;
"AaBb" + Chr( 143 ), .T., 5, 132, 4096 )
FT_DFSETUP( "test.txt", 5, 10, 10, 70, 1, 7, 15, ;
"AaBb" + Chr( 143 ), .T., 5, 132, 4096 )
cKey := FT_DISPFILE()
@@ -73,8 +73,8 @@
$EXAMPLES$
@ 4, 9 TO 11, 71
FT_DFSETUP( "test.txt", 5, 10, 10, 70, 1, 7, 15,;
"AaBb" + Chr( 143 ), .T., 5, 132, 4096 )
FT_DFSETUP( "test.txt", 5, 10, 10, 70, 1, 7, 15, ;
"AaBb" + Chr( 143 ), .T., 5, 132, 4096 )
cKey := FT_DISPFILE()

View File

@@ -50,8 +50,8 @@
$EXAMPLES$
@ 4, 9 TO 11, 71
FT_DFSETUP( "test.txt", 5, 10, 10, 70, 1, 7, 15,;
"AaBb" + Chr( 143 ), .T., 5, 132, 4096 )
FT_DFSETUP( "test.txt", 5, 10, 10, 70, 1, 7, 15, ;
"AaBb" + Chr( 143 ), .T., 5, 132, 4096 )
cKey := FT_DISPFILE()

View File

@@ -71,25 +71,25 @@
and/or column can be specified by the programmer. It also centers
each line of the message within the box.
$EXAMPLES$
The following example displays a simple two-line message
and returns immediately to the calling routine.
// The following example displays a simple two-line message
// and returns immediately to the calling routine.
FT_DISPMSG( { { "Printing Report" , ;
"Press [ESC] To Interrupt" } , ;
{ "W+/B*", "W/B", "GR+/B" } } )
FT_DISPMSG( { { "Printing Report", ;
"Press [ESC] To Interrupt" }, ;
{ "W+/B*", "W/B", "GR+/B" } } )
The next example displays a message and waits for a key press.
// The next example displays a message and waits for a key press.
FT_DISPMSG( { { "Press [D] To Confirm Deletion" , ;
"Or Any Other Key To Abort" } , ;
{ "W+/B", "W+/B", "GR+/B" } } , ;
"D" )
FT_DISPMSG( { { "Press [D] To Confirm Deletion", ;
"Or Any Other Key To Abort" }, ;
{ "W+/B", "W+/B", "GR+/B" } }, ;
"D" )
The next example displays a one-line message centered on row 5
and returns to the calling procedure.
// The next example displays a one-line message centered on row 5
// and returns to the calling procedure.
FT_DISPMSG( { { "Please Do Not Interrupt" } , ;
{ "W+/B", "GR+/B" } } , ;
, 5, )
FT_DISPMSG( { { "Please Do Not Interrupt" }, ;
{ "W+/B", "GR+/B" } }, ;
, 5, )
$END$
*/

View File

@@ -19,11 +19,11 @@
Given a string in the format x.yEz, the decimal
equivalent is returned.
$EXAMPLES$
? FT_E2D( "1.23E1" ) -> 12.3
? FT_E2D( "1.23E1" ) // -> 12.3
? FT_E2D( "-1.235E1" ) -> -12.35
? FT_E2D( "-1.235E1" ) // -> -12.35
? ft_d2e( "5.43E-6" ) -> 0.0000543
? ft_d2e( "5.43E-6" ) // -> 0.0000543
$SEEALSO$
FT_D2E()
$END$

View File

@@ -35,11 +35,11 @@
aRetVal[ 4, 1 ] Integer Seconds aRetVal[ 4, 2 ] Total Seconds (nn)
$EXAMPLES$
FT_ELAPSED( SToD( "19901128" ), SToD( "19901130" ), "08:00:00", "12:10:30" )
will return:
aRetVal[ 1, 1 ] -> 2 (Days) aRetVal[ 1, 2 ] -> 2.1740 Days
aRetVal[ 2, 1 ] -> 4 (Hours) aRetVal[ 2, 2 ] -> 52.1750 Hours
aRetVal[ 3, 1 ] -> 10 (Minutes) aRetVal[ 3, 2 ] -> 3130.5000 Minutes
aRetVal[ 4, 1 ] -> 30 (Seconds) aRetVal[ 4, 2 ] -> 187830 Seconds
// will return:
? aRetVal[ 1, 1 ] // -> 2 ( Days ) aRetVal[ 1, 2 ] -> 2.1740 Days
? aRetVal[ 2, 1 ] // -> 4 ( Hours ) aRetVal[ 2, 2 ] -> 52.1750 Hours
? aRetVal[ 3, 1 ] // -> 10 ( Minutes ) aRetVal[ 3, 2 ] -> 3130.5000 Minutes
? aRetVal[ 4, 1 ] // -> 30 ( Seconds ) aRetVal[ 4, 2 ] -> 187830 Seconds
$END$
*/

View File

@@ -108,7 +108,6 @@
nFile2 := FT_FUSE( "temp.h" )
? FT_FLASTRE() // no. of lines in temp.h
$SEEALSO$
FT_FUSE()
$END$
@@ -150,7 +149,6 @@
FT_FGOTOP() // go back to top
? FT_FRECNO() // 1
$SEEALSO$
FT_FSELECT() FT_FUSE() FT_FRECNO() FT_FGOBOT()
$END$
@@ -183,10 +181,9 @@
$EXAMPLES$
IF ft_fUse( "text.c" ) < 0 // open text file
err := ft_fError()
? 'Error opening file "rext.c", error code (' + ;
hb_ntos( err ) + ')'
? "Error opening file 'text.c', error code (" + ;
hb_ntos( err ) + ")"
ENDIF
$SEEALSO$
$END$
@@ -228,7 +225,6 @@
FT_FGOTOP() // go back to top
? FT_FRECNO() // 1
$SEEALSO$
FT_FSELECT() FT_FUSE() FT_FGOTOP() FT_FGOBOT()
$END$
@@ -265,7 +261,6 @@
FT_FGOBOT()
? FT_FREADLN()
$SEEALSO$
FT_FSELECT() FT_FUSE() FT_FGOTOP() FT_FRECNO() FT_FREADLN()
$END$
@@ -314,8 +309,6 @@
FT_FSKIP()
ENDDO
$SEEALSO$
FT_FRECNO() FT_FGOTOP()
$END$
@@ -364,7 +357,6 @@
FT_FSKIP()
ENDDO
$SEEALSO$
FT_FUSE() FT_FWRITELN() FT_FRECNO() FT_FGOTOP()
$END$
@@ -402,7 +394,6 @@
FT_FUSE( "test.txt" )
FT_FDELETE( 4 )
$SEEALSO$
FT_FAPPEND() FT_FRECNO() FT_FINSERT()
$END$
@@ -445,7 +436,6 @@
ft_fGoTo( 10 )
ft_fInsert( 5 )
$SEEALSO$
FT_FAPPEND() FT_FRECNO() FT_FDELETE() FT_FLASTRE()
$END$
@@ -498,7 +488,6 @@
FT_FAPPEND()
? FT_FRECNO() // displays 6
$SEEALSO$
FT_FRECNO() FT_FDELETE() FT_FINSERT() FT_FLASTRE()
$END$
@@ -548,14 +537,13 @@
FT_FUSE( "config.sys" )
DO WHILE UPPER( FT_FREADLN() ) != "FILES=" .AND. !F_FEOF()
DO WHILE Upper( FT_FREADLN() ) != "FILES=" .AND. !F_FEOF()
FT_FSKIP()
ENDDO
FT_FWRITELN( "FILES=30", FT_FEOF() )
$SEEALSO$
FT_FREADLN() FT_FRECNO() FT_FINSERT() FT_FDELETE()
$END$
@@ -588,7 +576,6 @@
FT_FUSE( "text.c" )
? FT_FLASTRE()
$SEEALSO$
FT_FUSE() FT_FRECNO()
$END$
@@ -624,7 +611,6 @@
FT_FSKIP()
? FT_FEOF() // .T.
$SEEALSO$
FT_FUSE() FT_FSKIP()
$END$
@@ -662,7 +648,6 @@
FT_FSKIP( -1 )
? FT_FBOF() // .T.
$SEEALSO$
FT_FSKIP() FT_EOF() FT_GOTOP()
$END$
@@ -707,10 +692,9 @@
ft_fUse( "fttext.c" )
ft_fGoTo(5)
ft_fGoTo( 5 )
cText := ft_fReadLN()
$SEEALSO$
FT_FRECNO() FT_FGOTOP() FT_FREADLN()
$END$

View File

@@ -41,26 +41,26 @@
program error occurs. If the value of ONE SPECIFIC variable is
desired, use Clipper's built-in GETE() function.
$EXAMPLES$
Get the environment in text form and browse it:
// Get the environment in text form and browse it:
cEnvBlock := ""
nNumStrings := FT_GETE( @cEnvBlock )
@ 0, 0 TO MaxRow() - 1, MaxCol()
@ MaxRow(), 0 SAY 'Browse strings, press ESC to exit...'
MemoWrit( cEnvBlock, 1, 1, MaxRow() - 2, MaxCol() - 1, .F. )
cEnvBlock := ""
nNumStrings := FT_GETE( @cEnvBlock )
@ 0, 0 TO MaxRow() - 1, MaxCol()
@ MaxRow(), 0 SAY 'Browse strings, press ESC to exit...'
MemoWrit( cEnvBlock, 1, 1, MaxRow() - 2, MaxCol() - 1, .F. )
Get the environment in text form and write it to a file:
// Get the environment in text form and write it to a file:
cEnvBlock := ""
FT_GETE( @cEnvBlock )
MEMOWRIT( "environ.txt", cEnvBlock )
cEnvBlock := ""
FT_GETE( @cEnvBlock )
MemoWrit( "environ.txt", cEnvBlock )
Get the environment in Array form:
// Get the environment in Array form:
aEnvArray := Array( FT_GETE() )
FT_GETE( aEnvArray )
? aEnvArray[ 1 ] // "COMSPEC=C:\command.com"
? aEnvArray[ 2 ] // "PATH=C:\;C:\util;C:\harbour"
... etc ...
aEnvArray := Array( FT_GETE() )
FT_GETE( aEnvArray )
? aEnvArray[ 1 ] // "COMSPEC=C:\command.com"
? aEnvArray[ 2 ] // "PATH=C:\;C:\util;C:\harbour"
... etc ...
$END$
*/

View File

@@ -21,7 +21,7 @@
$EXAMPLES$
FT_INT86( HEX2DEC( "21" ), aRegs )
Converts 21h, the Dos Interrupt, to its decimal equivalent,
33, for use by FT_INT86().
// Converts 21h, the Dos Interrupt, to its decimal equivalent,
// 33, for use by FT_INT86().
$END$
*/

View File

@@ -29,12 +29,11 @@
FT_IAmIdle() // Wait for ESC and announce idleness
ENDDO
* Here's another way to do it:
// Here's another way to do it:
FT_OnIdle( {|| FT_IAmIdle() } )
Inkey( 0 ) // Automatically reports idleness until key
// is pressed!
Inkey( 0 ) // Automatically reports idleness until key is pressed!
$SEEALSO$
FT_OnIdle()
$END$

View File

@@ -32,9 +32,9 @@
$EXAMPLES$
DO WHILE Whatever // Some batch process
Something() // Create 'n' discard a bunch of stuff
Something() // Create 'n' discard a bunch of stuff
FT_Idle() // Take out the garbage
FT_Idle() // Take out the garbage
ENDDO
$SEEALSO$

View File

@@ -29,16 +29,16 @@
are possible with Clipper code. For greater speed, write .c or
.asm versions and use the Clipper Extend system.
$EXAMPLES$
This code tests whether bit 3 is set in the byte represented by
Chr( 107 ):
// This code tests whether bit 3 is set in the byte represented by
// Chr( 107 ):
lBitflag := FT_ISBIT( Chr( 107 ), 3 )
? lBitflag // result: .T.
lBitflag := FT_ISBIT( Chr( 107 ), 3 )
? lBitflag // result: .T.
This code tests whether bit 5 is set in the byte represented by ASCII
65 (letter "A")
// This code tests whether bit 5 is set in the byte represented by ASCII
// 65 (letter "A")
? FT_ISBIT( "A", 5 ) // result: .F.
? FT_ISBIT( "A", 5 ) // result: .F.
$SEEALSO$
FT_BITSET() FT_BITCLR()
$END$

View File

@@ -66,8 +66,9 @@
// fill color array
// Box Border, Menu Options, Menu Bar, Current Selection, Unselected
aColors := iif( lColor, { "W+/G", "N/G", "N/G", "N/W", "N+/G" }, ;
{ "W+/N", "W+/N", "W/N", "N/W","W/N" } )
aColors := iif( lColor, ;
{ "W+/G", "N/G", "N/G", "N/W", "N+/G" }, ;
{ "W+/N", "W+/N", "W/N", "N/W", "W/N" } )
// array for first pulldown menu
FT_FILL( aOptions[ 1 ], "A. Execute A Dummy Procedure" , {|| fubar() }, .T. )
@@ -83,32 +84,32 @@
FT_FILL( aOptions[ 3 ], "B. Display Invoice Totals" , {|| .T. }, .T. )
FT_FILL( aOptions[ 3 ], "C. Exit To DOS" , {|| .F. }, .T. )
Call FT_FILL() once for each item on each pulldown menu, passing it
three parameters:
// Call FT_FILL() once for each item on each pulldown menu, passing it
// three parameters:
FT_FILL( <cMenuSelection>, <bCodeBlock>, <lSelectable>
FT_FILL( <cMenuSelection>, <bCodeBlock>, <lSelectable>
<cMenuSelection> is a character string which will be displayed on
the pulldown menu.
// <cMenuSelection> is a character string which will be displayed on
// the pulldown menu.
<bCodeBlock> should contain one of the following:
// <bCodeBlock> should contain one of the following:
A function name to execute, which in turn should return .T. or .F.
FT_MENU1 WILL RETURN CONTROL TO THE CALLING PROGRAM IF .F. IS
RETURNED OR CONTINUE IF .T. IS RETURNED.
// A function name to execute, which in turn should return .T. or .F.
// FT_MENU1 WILL RETURN CONTROL TO THE CALLING PROGRAM IF .F. IS
// RETURNED OR CONTINUE IF .T. IS RETURNED.
.F. WHICH WILL CAUSE FT_MENU1 TO RETURN CONTROL TO THE CALLING
PROGRAM.
// .F. WHICH WILL CAUSE FT_MENU1 TO RETURN CONTROL TO THE CALLING
// PROGRAM.
.T. WHICH WILL DO NOTHING. THIS ALLOWS THE DEVELOPER TO DESIGN A
SKELETON MENU STRUCTURE PRIOR TO COMPLETING ALL OF THE SUBROUTINES.
// .T. WHICH WILL DO NOTHING. THIS ALLOWS THE DEVELOPER TO DESIGN A
// SKELETON MENU STRUCTURE PRIOR TO COMPLETING ALL OF THE SUBROUTINES.
// CALL FT_MENU1
FT_MENU1( aBar, aOptions, aColors, 0 )
NOTE: FT_MENU1() disables Alt-C and Alt-D in order to make them
available for the menu bar. It enables Alt-D and resets
Alt-C to its previous state prior to calling each function.
// NOTE: FT_MENU1() disables Alt-C and Alt-D in order to make them
// available for the menu bar. It enables Alt-D and resets
// Alt-C to its previous state prior to calling each function.
$SEEALSO$
FT_FILL()
$END$

View File

@@ -133,7 +133,7 @@
// Prompt with pinpoint message control
@ 7, 1 PROMPT "Menu choice #4" MESSAGE "Drop Dead" ;
MSGROW 22 MSGCOL 4 MSGCOLOR "GR+/N"
MSGROW 22 MSGCOL 4 MSGCOLOR "GR+/N"
// Prompt with a trigger character ("#" character)
@ 11, 1 PROMPT "Menu choice #6" TRIGGER 13
@@ -186,8 +186,7 @@
// Simple command
MENU TO memvar
MENU TO MEMVAR
$INCLUDE$
ftmenuto.ch
$SEEALSO$

View File

@@ -104,8 +104,8 @@
FT_CIV2MIL( "12:00 m" ) // 0000
Caution: leading blanks are irrelevant; p,a,n,m must be preceded by
one and only one space.
// Caution: leading blanks are irrelevant; p,a,n,m must be preceded by
// one and only one space.
$SEEALSO$
FT_MIL2CIV() FT_SYS2MIL() FT_MIL2MIN() FT_MIN2MIL()
$END$

View File

@@ -102,12 +102,12 @@
This is a mouse meta function that checks for the presence
of a double click.
$EXAMPLES$
IF FT_MISREGION( 10, 10, 11, 20 ) .AND.;
IF FT_MISREGION( 10, 10, 11, 20 ) .AND. ;
FT_MDBLCLK( 0, 1,, FT_MGETX(), FT_MGETY() ) // double click, right button
// at current location with
// default interval
MnuItem1()
MnuItem1()
ENDIF
$SEEALSO$
FT_MBUTPRS() FT_MBUTREL()

View File

@@ -29,21 +29,21 @@
Also, numeric 0 is returned as a null string. You will need to
make a decision how to output it (zero dollars, no dollars, etc).
$EXAMPLES$
? FT_NTOW( 999 ) -> Nine Hundred Ninety Nine
? FT_NTOW( 999 ) // -> Nine Hundred Ninety Nine
? FT_NTOW( 1000 ) -> One Thousand
? FT_NTOW( 1000 ) // -> One Thousand
? FT_NTOW( 23 ) + " Dollars and " + FT_NTOW( 99 ) + " Cents"
-> Twenty Three Dollars and Ninety Nine Cents
// -> Twenty Three Dollars and Ninety Nine Cents
? FT_NTOW( 23 ) + " Dollars and " + "99/100"
-> Twenty Three Dollars and 99/100
// -> Twenty Three Dollars and 99/100
x := -23.99
cents := Str( ( x - Int( x ) ) * 100, 2, 0 ) + "/100"
x := Int( x )
string := iif( x < 0, "Credit of ", "Debit of " )
? string + FT_NTOW( Abs( x ) ) + " Dollars and " + "99/100"
-> Credit of Twenty Three Dollars and 99/100
// -> Credit of Twenty Three Dollars and 99/100
$END$
*/

View File

@@ -27,7 +27,7 @@
? "NumLock is active"
ENDIF
Another one, slightly strange, courtesy of Glenn Scott:
// Another one, slightly strange, courtesy of Glenn Scott:
#include "inkey.ch"

View File

@@ -302,7 +302,6 @@
ENDIF
// Processing, then:
FT_NWSEMUNLOCK( nHandle )
$SEEALSO$
FT_NWSEMOPEN() FT_NWSEMEX() FT_NWSEMWAIT() FT_NWSEMSIG() FT_NWSEMUNLOCK()
$END$
@@ -342,7 +341,6 @@
ENDIF
// Processing, then:
FT_NWSEMUNLOCK( nHandle )
$SEEALSO$
FT_NWSEMOPEN() FT_NWSEMEX() FT_NWSEMWAIT() FT_NWSEMSIG() FT_NWSEMLOCK()
$END$

View File

@@ -42,7 +42,6 @@
SetPos( nRow, nCol )
RETURN
$SEEALSO$
$END$

View File

@@ -76,16 +76,16 @@
$EXAMPLES$
cSetUp := "27,116,1"
SET PRINT ON
? FT_PChr( cSetUp ) -> (Chr(27)+Chr(116)+Chr(1))
? FT_PChr( cSetUp ) // -> (Chr(27)+Chr(116)+Chr(1))
<select Epson char. graphics>
? FT_PChr( '27,"x",0' ) -> (Chr(27)+Chr(120)+Chr(0))
? FT_PChr( '27,"x",0' ) // -> (Chr(27)+Chr(120)+Chr(0))
<Epson draft mode>
? FT_PChr( '&1B,"E"' ) -> (Chr(27)+Chr(69)) <HP reset>
? FT_PChr( '&1B,"E"' ) // -> (Chr(27)+Chr(69)) <HP reset>
? FT_PChr( "/ELITE,/NLQ" ) ->(Chr(27)+Chr(77)+Chr(27)+Chr(120)+Chr(1))
<Epson elite & near letter quality>
? FT_PChr( "/ELITE,/NLQ" ) // -> (Chr(27)+Chr(77)+Chr(27)+Chr(120)+Chr(1))
// <Epson elite & near letter quality>
$SEEALSO$
$END$

View File

@@ -37,17 +37,16 @@
pending message is issued much too soon after the current one.
$EXAMPLES$
FT_PENDING( "Message one",20,0,3,"W+/G" ) // Displays "Message one."
// sets row to 20, col to 0.
// wait to 3 and color to
// bright white over green.
FT_PENDING( "Message one", 20, 0, 3, "W+/G" ) // Displays "Message one."
// sets row to 20, col to 0.
// wait to 3 and color to
// bright white over green.
FT_PENDING( "Message two" ) // Displays "Message two", after 5 sec.
FT_PENDING( "Message three" ) // Displays "Message three", after 5 sec.
Note that default row, col, wait time and color need to be set only
once in the very first call to FT_PENDING() and only if the internal
default values are not appropriate.
// Note that default row, col, wait time and color need to be set only
// once in the very first call to FT_PENDING() and only if the internal
// default values are not appropriate.
$END$
*/

View File

@@ -21,7 +21,7 @@
supported: FILTER, FORMAT, FUNCTION, INDEX, KEYS, MODE, ORDER,
PROCEDURE, RELATION, TYPEAHEAD
$EXAMPLES$
FT_RESTSETS(aOldSets)
FT_RESTSETS( aOldSets )
$INCLUDE$
set.ch
$SEEALSO$

View File

@@ -38,9 +38,10 @@
$EXAMPLES$
aArray := { { "Invoice 1", SToD( "19910415" ), 1234.32, .T. },;
{ "Invoice 2", Date(), 234.98, .F. },;
{ "Invoice 3", Date() + 1, 0, .T. } }
aArray := { ;
{ "Invoice 1", SToD( "19910415" ), 1234.32, .T. }, ;
{ "Invoice 2", Date(), 234.98, .F. }, ;
{ "Invoice 3", Date() + 1, 0, .T. } }
nErrorCode := 0
FT_SAVEARR( aArray, "invoice.dat", @nErrorCode )
IF nErrorCode == 0
@@ -51,7 +52,6 @@
ELSE
? "Error writing array"
ENDIF
$SEEALSO$
FT_RESTARR()
$END$
@@ -85,9 +85,10 @@
please do and send it to Glenn Scott 71620,1521.]
$EXAMPLES$
aArray := { { "Invoice 1", SToD( "19910415" ), 1234.32, .T. },;
{ "Invoice 2", Date(), 234.98, .F. },;
{ "Invoice 3", Date() + 1, 0, .T. } }
aArray := { ;
{ "Invoice 1", SToD( "19910415" ), 1234.32, .T. }, ;
{ "Invoice 2", Date(), 234.98, .F. }, ;
{ "Invoice 3", Date() + 1, 0, .T. } }
nErrorCode := 0
FT_SAVEARR( aArray, "invoice.dat", @nErrorCode )
IF nErrorCode == 0
@@ -98,7 +99,6 @@
ELSE
? "Error writing array"
ENDIF
$SEEALSO$
FT_SAVEARR()
$END$

View File

@@ -29,8 +29,8 @@
FT_SAVRGN() calls Clipper's SAVESCREEN(). Refer to the Clipper
documentation for more information regarding this function.
$EXAMPLES$
The following example uses FT_SAVRGN() and FT_RSTRGN() to save
and restore a portion of the screen.
// The following example uses FT_SAVRGN() and FT_RSTRGN() to save
// and restore a portion of the screen.
@ 0, 0, 24, 79 BOX "111111111" // fill the screen with 1's
cScreen := FT_SAVRGN( 10, 10, 20, 30 ) // save a region
@@ -71,8 +71,8 @@
FT_RSTRGN() calls Clipper's RESTSCREEN(). Refer to the Clipper
documentation for more information regarding this function.
$EXAMPLES$
The following example uses FT_RSTRGN() to restore a saved portion
of the screen to different locations.
// The following example uses FT_RSTRGN() to restore a saved portion
// of the screen to different locations.
@ 0, 0, 24, 79 BOX "111111111" // fill the screen with 1's
cScreen := FT_SAVRGN( 10, 10, 20, 30 ) // save a region
@@ -135,8 +135,8 @@
FT_RGNSTACK() calls FT_SAVRGN() and FT_RSTRGN(). Refer to the
documentation for these two functions for more information.
$EXAMPLES$
The following example uses FT_RGNSTACK() to save and restore various
sections of the screen.
// The following example uses FT_RGNSTACK() to save and restore various
// sections of the screen.
@ 0, 0, 24, 79 BOX "111111111" // fill the screen with 1's
FT_RGNSTACK( "push", 10, 5, 15, 15 ) // push a region

View File

@@ -28,8 +28,8 @@
the DOS Set Date service (Interrupt 33, service 43).
$EXAMPLES$
The following program takes a date from the command line and sets
the DOS system date:
// The following program takes a date from the command line and sets
// the DOS system date:
PROCEDURE Main( cDate )
@@ -39,6 +39,5 @@
? "Today is now: " + DToC( Date() )
RETURN
$END$
*/

View File

@@ -26,17 +26,16 @@
the DOS Set Time service (Interrupt 33, service 45).
$EXAMPLES$
The following program takes a time string from the command line and sets
the DOS system time:
// The following program takes a time string from the command line and sets
// the DOS system time:
PROCEDURE Main( cTime )
PROCEDURE Main( cTime )
cTime := iif( cTime == NIL, Time(), cTime )
? "Setting time to: " + cTime + "... "
FT_SETTIME( cTime )
? "Time is now: " + Time()
RETURN
cTime := iif( cTime == NIL, Time(), cTime )
? "Setting time to: " + cTime + "... "
FT_SETTIME( cTime )
? "Time is now: " + Time()
RETURN
$END$
*/

View File

@@ -20,9 +20,9 @@
shift key is pressed, such as during a MemoEdit().
$EXAMPLES$
IF FT_SHIFT()
@ 24, 0 say "Shift"
@ 24, 0 SAY "Shift"
ELSE
@ 24, 0 say " "
@ 24, 0 SAY " "
ENDIF
$SEEALSO$
FT_CAPLOCK() FT_CTRL() FT_NUMLOCK() FT_PRTSCR() FT_ALT()

View File

@@ -36,16 +36,15 @@
The routine correctly handles passing through midnight but will not
work for more than 24 hours.
$EXAMPLES$
Example 1:
FT_SLEEP( 10.0 ) // Sleep for 10.0 seconds
Example 2:
nTime := SECONDS() // usually after some interupt from mouse or
// keyboard
// Example 1:
FT_SLEEP( 10.0 ) // Sleep for 10.0 seconds
// Example 2:
nTime := SECONDS() // usually after some interupt from mouse or
// keyboard
... intervening code ...
FT_SLEEP( 0.5, nTime ) // Sleep until the sytem clock is
// nTime+0.5 seconds.
// ... intervening code ...
// FT_SLEEP( 0.5, nTime ) // Sleep until the sytem clock is
// nTime+0.5 seconds.
$END$
*/

View File

@@ -24,9 +24,9 @@
the original number from the compressed string.
$EXAMPLES$
REPLACE TRANS->cust_id WITH FT_SQZN( mcust_id, 8 ),;
TRANS->amount WITH FT_SQZN( mamount, 12, 2 )
REPLACE ;
TRANS->cust_id WITH FT_SQZN( mcust_id, 8 ), ;
TRANS->amount WITH FT_SQZN( mamount, 12, 2 )
$SEEALSO$
FT_UNSQZN()
$INCLUDE$
@@ -61,9 +61,8 @@
requirements for numeric fields in a database file.
$EXAMPLES$
mcust_id := FT_UNSQZN( TRANS->cust_id, 8 ),;
mcust_id := FT_UNSQZN( TRANS->cust_id, 8 )
mamount := FT_UNSQZN( TRANS->amount, 12, 2 )
$SEEALSO$
FT_SQZN()
$INCLUDE$

View File

@@ -59,9 +59,9 @@
This is a demonstration of TBrowse with a WHILE condition for an
indexed database.
$EXAMPLES$
* This example will only show those people with last name of "JONES"
* in the TBNames.dbf which contains at least the fields:
* Last, First, City AND is indexed on Last + First.
// This example will only show those people with last name of "JONES"
// in the TBNames.dbf which contains at least the fields:
// Last, First, City AND is indexed on Last + First.
LOCAL nRecSel := 0
LOCAL aFields := {}
LOCAL bWhile := {|| TBNames->Last = "JONES" }
@@ -73,8 +73,8 @@
USE TBNames INDEX TBNames NEW // indexed on Last + First
* Pass Heading as character and Field as Block including Alias
* To eliminate the need to use FIELDWBLOCK() function in FT_BRWSWHL()
// Pass Heading as character and Field as Block including Alias
// To eliminate the need to use FIELDWBLOCK() function in FT_BRWSWHL()
AAdd( aFields, { "Last Name" , {|| TBNames->Last } } )
AAdd( aFields, { "First Name", {|| TBNames->First } } )
AAdd( aFields, { "City" , {|| TBNames->City } } )
@@ -84,7 +84,7 @@
? "Sorry, NO Records Were Selected"
ELSE
? "You Selected: " + TBNames->Last + " " + ;
TBNames->First + " " + TBNames->City
TBNames->First + " " + TBNames->City
ENDIF
$END$
*/

View File

@@ -34,16 +34,16 @@
This function requires FT_INT86().
$EXAMPLES$
Create a unique file in the root of the current drive:
// Create a unique file in the root of the current drive:
myFile := FT_TEMPFIL()
myFile := FT_TEMPFIL()
Create a unique file in the current directory and hide it:
// Create a unique file in the current directory and hide it:
myFile := FT_TEMPFIL( "." + hb_ps(), .T. )
myFile := FT_TEMPFIL( "." + hb_ps(), .T. )
Create a unique file on another drive, but do not hide it:
// Create a unique file on another drive, but do not hide it:
myFile := FT_TEMPFIL( "E:\nanfor\src\" )
myFile := FT_TEMPFIL( "E:\nanfor\src\" )
$END$
*/

View File

@@ -37,8 +37,8 @@
option, you can save on a lot of DO CASE or IF..ELSEIF code in your
main program. See the test code for a succinct demonstration.
$EXAMPLES$
LOCAL mainmenu := ;
{ { "Data Entry", "Enter data", {|| FT_MENU2( datamenu ) } }, ;
LOCAL mainmenu := { ;
{ "Data Entry", "Enter data", {|| FT_MENU2( datamenu ) } }, ;
{ "Reports", "Hard copy", {|| FT_MENU2( repmenu ) } }, ;
{ "Maintenance", "Reindex files", {|| FT_MENU2( maintmenu ) } }, ;
{ "Quit", "See ya later" } }

View File

@@ -71,6 +71,5 @@
$EXAMPLES$
aCurInfo := getVCur( 1 ) // Get info on cursor pos in page 1
? "Row: " + Str( aCurInfo[ 3 ] ) + " Col: " + Str( aCurInfo[ 4 ] )
$END$
*/

View File

@@ -33,9 +33,8 @@
$EXAMPLES$
FT_VIDSTR( 10, 20, "Enter Name :", 165 )
This example will print the specified text at coordinates 10, 20
in bright white on top of Magenta.
// This example will print the specified text at coordinates 10, 20
// in bright white on top of Magenta.
$END$
*/
@@ -66,16 +65,15 @@
where speed is important. It is faster and requires less memory than
FT_VIDSTR(). A working example is contained in clrtable.prg.
$EXAMPLES$
FOR nX := 1 to MaxRow()
FOR nY := 1 to MaxCol()
FOR nX := 1 TO MaxRow()
FOR nY := 1 TO MaxCol()
FT_WRTChr( nX, nY, "∙", ( nX - 1 ) + ( nY * 16 ) )
NEXT
NEXT
This example will write the ASCII character 249 to every location
on screen in every possible color combination. It will recognize
the status of SetBlink(). It uses direct video writes for speed.
This example will write the ASCII character 249 TO every location
ON SCREEN in every possible COLOR combination. It will recognize
the status of SetBlink(). It uses direct video writes FOR speed.
$END$
*/
@@ -108,8 +106,8 @@
$EXAMPLES$
FT_CLS( 0, 0, MaxRow(), MaxCol(), 165 )
This example will clear the entire screen with the colors
bright white on magenta.
// This example will clear the entire screen with the colors
// bright white on magenta.
$END$
*/
@@ -139,8 +137,8 @@
$EXAMPLES$
FT_SETATTR( 0, 0, MaxRow(), MaxCol(), 95 )
This example will change the entire screen's colors to bright white on
magenta without changing or overwriting any text on the screen.
// This example will change the entire screen's colors to bright white on
// magenta without changing or overwriting any text on the screen.
$END$
*/
@@ -166,8 +164,8 @@
$EXAMPLES$
FT_REVATTR( 0, 0, MaxRow(), MaxCol() )
This example will change the entire screen's colors to their reverse
attributes without changing or overwriting any text.
// This example will change the entire screen's colors to their reverse
// attributes without changing or overwriting any text.
$END$
*/
@@ -192,8 +190,8 @@
$EXAMPLES$
FT_REVCHR( 10, 20 )
This example will change the text and background at 10, 20 to it's
reverse color attributes without changing or overwriting the
character itself.
// This example will change the text and background at 10, 20 to it's
// reverse color attributes without changing or overwriting the
// character itself.
$END$
*/

View File

@@ -52,8 +52,8 @@
(Microsoft Press)
$EXAMPLES$
PROCEDURE Main( cMode )
FT_SETMODE( Val( cMode ) )
? "Video mode is: " + Str( FT_GETMODE() )
RETURN
FT_SETMODE( Val( cMode ) )
? "Video mode is: " + Str( FT_GETMODE() )
RETURN
$END$
*/

View File

@@ -39,7 +39,6 @@
dPost := SToD( "19910101" )
dPost += FT_ADDWKDY( dPost, 5 ) // returns 7 true days
? dPost // 01/08/91
$SEEALSO$
FT_WORKDAYS()
$END$

View File

@@ -24,7 +24,7 @@
Handles dates with CENTURY ON|OFF, to allow for 21st century.
Date validation must be external to this function.
$EXAMPLES$
These code fragments find the week number, given a date.
// These code fragments find the week number, given a date.
// literal character date
dDate := SToD( "19910101" )
@@ -63,7 +63,7 @@
Handles dates with CENTURY ON|OFF, to allow for 21st century.
Date validation must be external to this function.
$EXAMPLES$
These code fragments find the day number, given a date.
// These code fragments find the day number, given a date.
// literal character date
dDate := SToD( "19910101" )
@@ -81,7 +81,7 @@
// last day of year
nDayNum := FT_DOY( SToD( "19911231" ) ) // result: 365
For a demonstration of this function, compile and link the
program woy.prg in the Nanforum Toolkit source code.
// For a demonstration of this function, compile and link the
// program woy.prg in the Nanforum Toolkit source code.
$END$
*/

View File

@@ -63,17 +63,18 @@
The text is white on black.
The box is centered both vertically and horizontally.
$EXAMPLES$
The following displays a two-line box with default settings:
// The following displays a two-line box with default settings:
FT_XBOX( ,,,,,,, "This is a test", "of the XBOX() function" )
FT_XBOX( ,,,,,,, "This is a test", "of the XBOX() function" )
The following uses all optional parameters and displays a three-line
box. The box is left-justified with a double border. It has a yellow
on red border and white on blue text. The function will wait for a
keypress before returning control to the calling routine.
// The following uses all optional parameters and displays a three-line
// box. The box is left-justified with a double border. It has a yellow
// on red border and white on blue text. The function will wait for a
// keypress before returning control to the calling routine.
FT_XBOX( "L", "W", "D", "GR+/R", "W/B", 5, 10, "It is so nice",;
"to not have to do the messy chore",;
"of calculating the box size!" )
FT_XBOX( "L", "W", "D", "GR+/R", "W/B", 5, 10, ;
"It is so nice", ;
"to not have to do the messy chore", ;
"of calculating the box size!" )
$END$
*/

View File

@@ -257,7 +257,7 @@
nLen := Len( aFiles )
aGauge := GaugeNew( 5, 5, 7, 40, "W/B", "W+/B", "." )
GaugeDisplay( aGauge )
hb_ZipFileByTDSpan( "test33.zip", aFiles, 9, {| cFile, nPos | GaugeUpdate( aGauge, nPos / nLen) },, "hello",, 6585452 )
hb_ZipFileByTDSpan( "test33.zip", aFiles, 9, {| cFile, nPos | GaugeUpdate( aGauge, nPos / nLen ) },, "hello",, 6585452 )
RETURN
$STATUS$
R

View File

@@ -737,7 +737,7 @@
/* The above codeblock will be called approximately
every 2 seconds while indexing.
The codeblock can return .T. to abort. */
INDEX ON First+LAST+LABEL1+LABEL2 TAG First
INDEX ON First + LAST + LABEL1 + LABEL2 TAG First
AdsClrCallBack()
RETURN
@@ -1260,11 +1260,11 @@
AdsDDAddTable() adds a new table to an ADS data dictionary.
To add the table you must be connected as ADSSYS user using the AdsConnect60() function
$EXAMPLES$
IF adsConnect60( "harbour.add", 7/* All types of connection*/, "ADSSYS", "",)
IF adsConnect60( "harbour.add", 7 /* All types of connection */, "ADSSYS", "", )
// Add one user
AdsDDCreateUser(,"Luiz", "papael", "This is luiz User")
AdsDDCreateUser( , "Luiz", "papael", "This is luiz User" )
// Add the tables
AdsDDaddTable("Table1", "table1.adt", "table1.adi")
AdsDDaddTable( "Table1", "table1.adt", "table1.adi" )
$TESTS$
$STATUS$
@@ -1333,9 +1333,9 @@
Adsconnect60() makes the connection to an advantage database server.
See ace.hlp for full details about the Advantage Database Server.
$EXAMPLES$
IF adsConnect60( "harbour.add", 7/* All types of connection*/, "ADSSYS", "",)
IF adsConnect60( "harbour.add", 7 /* All types of connection */, "ADSSYS", "", )
// Add one user
AdsDDCreateUser(, "Luiz", "papael", "This is luiz User")
AdsDDCreateUser( , "Luiz", "papael", "This is luiz User" )
ENDIF
$STATUS$
R