2016-10-18 19:16 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com)
- contrib/hbct/doc/en/ct.txt
* contrib/hbct/doc/en/ctc.txt
* contrib/hbct/doc/en/strdiff.txt
* contrib/hbct/doc/en/token2.txt
* contrib/hbgt/doc/en/hbgt.txt
* contrib/hbmisc/doc/en/dates2.txt
* contrib/hbmisc/doc/en/ht_class.txt
* contrib/hbmisc/doc/en/ht_str.txt
* contrib/hbnf/doc/en/aavg.txt
* contrib/hbnf/doc/en/acctadj.txt
* contrib/hbnf/doc/en/acctmnth.txt
* contrib/hbnf/doc/en/acctqtr.txt
* contrib/hbnf/doc/en/acctweek.txt
* contrib/hbnf/doc/en/acctyear.txt
* contrib/hbnf/doc/en/adapter.txt
* contrib/hbnf/doc/en/aemaxlen.txt
* contrib/hbnf/doc/en/aeminlen.txt
* contrib/hbnf/doc/en/alt.txt
* contrib/hbnf/doc/en/amedian.txt
* contrib/hbnf/doc/en/anomatch.txt
* contrib/hbnf/doc/en/any2any.txt
* contrib/hbnf/doc/en/aredit.txt
* contrib/hbnf/doc/en/asum.txt
* contrib/hbnf/doc/en/at2.txt
* contrib/hbnf/doc/en/bitclr.txt
* contrib/hbnf/doc/en/byt2bit.txt
* contrib/hbnf/doc/en/byt2hex.txt
* contrib/hbnf/doc/en/calendar.txt
* contrib/hbnf/doc/en/chdir.txt
* contrib/hbnf/doc/en/cint86.txt
* contrib/hbnf/doc/en/clrsel.txt
* contrib/hbnf/doc/en/cntryset.txt
* contrib/hbnf/doc/en/ctrl.txt
* contrib/hbnf/doc/en/d2e.txt
* contrib/hbnf/doc/en/datecnfg.txt
* contrib/hbnf/doc/en/default.txt
* contrib/hbnf/doc/en/dosver.txt
* contrib/hbnf/doc/en/easter.txt
* contrib/hbnf/doc/en/elapmil.txt
* contrib/hbnf/doc/en/elapsed.txt
* contrib/hbnf/doc/en/eltime.txt
* contrib/hbnf/doc/en/findith.txt
* contrib/hbnf/doc/en/firstday.txt
* contrib/hbnf/doc/en/floptst.txt
* contrib/hbnf/doc/en/fttext.txt
* contrib/hbnf/doc/en/getenvrn.txt
* contrib/hbnf/doc/en/hex2dec.txt
* contrib/hbnf/doc/en/iamidle.txt
* contrib/hbnf/doc/en/idle.txt
* contrib/hbnf/doc/en/inp.txt
* contrib/hbnf/doc/en/invclr.txt
* contrib/hbnf/doc/en/isprint.txt
* contrib/hbnf/doc/en/lastday.txt
* contrib/hbnf/doc/en/linked.txt
* contrib/hbnf/doc/en/madd.txt
* contrib/hbnf/doc/en/menu1.txt
* contrib/hbnf/doc/en/menutonf.txt
* contrib/hbnf/doc/en/metaph.txt
* contrib/hbnf/doc/en/miltime.txt
* contrib/hbnf/doc/en/min2dhm.txt
* contrib/hbnf/doc/en/mkdir.txt
* contrib/hbnf/doc/en/month.txt
* contrib/hbnf/doc/en/mouse1.txt
* contrib/hbnf/doc/en/n2color.txt
* contrib/hbnf/doc/en/netpv.txt
* contrib/hbnf/doc/en/nooccur.txt
* contrib/hbnf/doc/en/ntow.txt
* contrib/hbnf/doc/en/nwlstat.txt
* contrib/hbnf/doc/en/nwsem.txt
* contrib/hbnf/doc/en/nwuid.txt
* contrib/hbnf/doc/en/origin.txt
* contrib/hbnf/doc/en/outp.txt
* contrib/hbnf/doc/en/page.txt
* contrib/hbnf/doc/en/peek.txt
* contrib/hbnf/doc/en/pickday.txt
* contrib/hbnf/doc/en/popadder.txt
* contrib/hbnf/doc/en/proper.txt
* contrib/hbnf/doc/en/putkey.txt
* contrib/hbnf/doc/en/qtr.txt
* contrib/hbnf/doc/en/rand1.txt
* contrib/hbnf/doc/en/reboot.txt
* contrib/hbnf/doc/en/rmdir.txt
* contrib/hbnf/doc/en/round.txt
* contrib/hbnf/doc/en/savearr.txt
* contrib/hbnf/doc/en/scancode.txt
* contrib/hbnf/doc/en/setdate.txt
* contrib/hbnf/doc/en/settime.txt
* contrib/hbnf/doc/en/shift.txt
* contrib/hbnf/doc/en/sinkey.txt
* contrib/hbnf/doc/en/sleep.txt
* contrib/hbnf/doc/en/sqzn.txt
* contrib/hbnf/doc/en/stod.txt
* contrib/hbnf/doc/en/sysmem.txt
* contrib/hbnf/doc/en/tbwhile.txt
* contrib/hbnf/doc/en/tempfile.txt
* contrib/hbnf/doc/en/vertmenu.txt
* contrib/hbnf/doc/en/vidcur.txt
* contrib/hbnf/doc/en/vidmode.txt
* contrib/hbnf/doc/en/wda.txt
* contrib/hbnf/doc/en/week.txt
* contrib/hbnf/doc/en/year.txt
* contrib/hbziparc/doc/en/hbziparc.txt
* contrib/rddads/doc/en/adsfuncs.txt
* contrib/rddads/doc/en/readme.txt
* doc/en/1stread.txt
* doc/en/array.txt
* doc/en/binnum.txt
* doc/en/browse.txt
* doc/en/command.txt
* doc/en/compiler.txt
* doc/en/datetime.txt
* doc/en/dbdelim.txt
* doc/en/dbsdf.txt
* doc/en/dbstrux.txt
* doc/en/dir.txt
* doc/en/diskspac.txt
* doc/en/errsys.txt
* doc/en/eval.txt
* doc/en/file.txt
* doc/en/garbage.txt
* doc/en/harbext.txt
* doc/en/hashes.txt
* doc/en/hb_set.txt
* doc/en/hbinet.txt
* doc/en/hvm.txt
* doc/en/idle.txt
* doc/en/input.txt
* doc/en/lang.txt
* doc/en/macro.txt
* doc/en/math.txt
* doc/en/memo.txt
* doc/en/memvar.txt
* doc/en/menu.txt
* doc/en/misc.txt
* doc/en/nation.txt
* doc/en/objfunc.txt
* doc/en/rdd.txt
* doc/en/rdddb.txt
* doc/en/rddmisc.txt
* doc/en/rddord.txt
* doc/en/set.txt
* doc/en/setmode.txt
* doc/en/string.txt
* doc/en/tclass.txt
* doc/en/terminal.txt
* doc/en/tgetlist.txt
* doc/en/tlabel.txt
* doc/en/treport.txt
* doc/en/var.txt
* sync with fixes/updates from 3.4 fork
This commit is contained in:
152
ChangeLog.txt
152
ChangeLog.txt
@@ -10,6 +10,158 @@
|
||||
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
|
||||
*/
|
||||
|
||||
2016-10-18 19:16 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com)
|
||||
- contrib/hbct/doc/en/ct.txt
|
||||
* contrib/hbct/doc/en/ctc.txt
|
||||
* contrib/hbct/doc/en/strdiff.txt
|
||||
* contrib/hbct/doc/en/token2.txt
|
||||
* contrib/hbgt/doc/en/hbgt.txt
|
||||
* contrib/hbmisc/doc/en/dates2.txt
|
||||
* contrib/hbmisc/doc/en/ht_class.txt
|
||||
* contrib/hbmisc/doc/en/ht_str.txt
|
||||
* contrib/hbnf/doc/en/aavg.txt
|
||||
* contrib/hbnf/doc/en/acctadj.txt
|
||||
* contrib/hbnf/doc/en/acctmnth.txt
|
||||
* contrib/hbnf/doc/en/acctqtr.txt
|
||||
* contrib/hbnf/doc/en/acctweek.txt
|
||||
* contrib/hbnf/doc/en/acctyear.txt
|
||||
* contrib/hbnf/doc/en/adapter.txt
|
||||
* contrib/hbnf/doc/en/aemaxlen.txt
|
||||
* contrib/hbnf/doc/en/aeminlen.txt
|
||||
* contrib/hbnf/doc/en/alt.txt
|
||||
* contrib/hbnf/doc/en/amedian.txt
|
||||
* contrib/hbnf/doc/en/anomatch.txt
|
||||
* contrib/hbnf/doc/en/any2any.txt
|
||||
* contrib/hbnf/doc/en/aredit.txt
|
||||
* contrib/hbnf/doc/en/asum.txt
|
||||
* contrib/hbnf/doc/en/at2.txt
|
||||
* contrib/hbnf/doc/en/bitclr.txt
|
||||
* contrib/hbnf/doc/en/byt2bit.txt
|
||||
* contrib/hbnf/doc/en/byt2hex.txt
|
||||
* contrib/hbnf/doc/en/calendar.txt
|
||||
* contrib/hbnf/doc/en/chdir.txt
|
||||
* contrib/hbnf/doc/en/cint86.txt
|
||||
* contrib/hbnf/doc/en/clrsel.txt
|
||||
* contrib/hbnf/doc/en/cntryset.txt
|
||||
* contrib/hbnf/doc/en/ctrl.txt
|
||||
* contrib/hbnf/doc/en/d2e.txt
|
||||
* contrib/hbnf/doc/en/datecnfg.txt
|
||||
* contrib/hbnf/doc/en/default.txt
|
||||
* contrib/hbnf/doc/en/dosver.txt
|
||||
* contrib/hbnf/doc/en/easter.txt
|
||||
* contrib/hbnf/doc/en/elapmil.txt
|
||||
* contrib/hbnf/doc/en/elapsed.txt
|
||||
* contrib/hbnf/doc/en/eltime.txt
|
||||
* contrib/hbnf/doc/en/findith.txt
|
||||
* contrib/hbnf/doc/en/firstday.txt
|
||||
* contrib/hbnf/doc/en/floptst.txt
|
||||
* contrib/hbnf/doc/en/fttext.txt
|
||||
* contrib/hbnf/doc/en/getenvrn.txt
|
||||
* contrib/hbnf/doc/en/hex2dec.txt
|
||||
* contrib/hbnf/doc/en/iamidle.txt
|
||||
* contrib/hbnf/doc/en/idle.txt
|
||||
* contrib/hbnf/doc/en/inp.txt
|
||||
* contrib/hbnf/doc/en/invclr.txt
|
||||
* contrib/hbnf/doc/en/isprint.txt
|
||||
* contrib/hbnf/doc/en/lastday.txt
|
||||
* contrib/hbnf/doc/en/linked.txt
|
||||
* contrib/hbnf/doc/en/madd.txt
|
||||
* contrib/hbnf/doc/en/menu1.txt
|
||||
* contrib/hbnf/doc/en/menutonf.txt
|
||||
* contrib/hbnf/doc/en/metaph.txt
|
||||
* contrib/hbnf/doc/en/miltime.txt
|
||||
* contrib/hbnf/doc/en/min2dhm.txt
|
||||
* contrib/hbnf/doc/en/mkdir.txt
|
||||
* contrib/hbnf/doc/en/month.txt
|
||||
* contrib/hbnf/doc/en/mouse1.txt
|
||||
* contrib/hbnf/doc/en/n2color.txt
|
||||
* contrib/hbnf/doc/en/netpv.txt
|
||||
* contrib/hbnf/doc/en/nooccur.txt
|
||||
* contrib/hbnf/doc/en/ntow.txt
|
||||
* contrib/hbnf/doc/en/nwlstat.txt
|
||||
* contrib/hbnf/doc/en/nwsem.txt
|
||||
* contrib/hbnf/doc/en/nwuid.txt
|
||||
* contrib/hbnf/doc/en/origin.txt
|
||||
* contrib/hbnf/doc/en/outp.txt
|
||||
* contrib/hbnf/doc/en/page.txt
|
||||
* contrib/hbnf/doc/en/peek.txt
|
||||
* contrib/hbnf/doc/en/pickday.txt
|
||||
* contrib/hbnf/doc/en/popadder.txt
|
||||
* contrib/hbnf/doc/en/proper.txt
|
||||
* contrib/hbnf/doc/en/putkey.txt
|
||||
* contrib/hbnf/doc/en/qtr.txt
|
||||
* contrib/hbnf/doc/en/rand1.txt
|
||||
* contrib/hbnf/doc/en/reboot.txt
|
||||
* contrib/hbnf/doc/en/rmdir.txt
|
||||
* contrib/hbnf/doc/en/round.txt
|
||||
* contrib/hbnf/doc/en/savearr.txt
|
||||
* contrib/hbnf/doc/en/scancode.txt
|
||||
* contrib/hbnf/doc/en/setdate.txt
|
||||
* contrib/hbnf/doc/en/settime.txt
|
||||
* contrib/hbnf/doc/en/shift.txt
|
||||
* contrib/hbnf/doc/en/sinkey.txt
|
||||
* contrib/hbnf/doc/en/sleep.txt
|
||||
* contrib/hbnf/doc/en/sqzn.txt
|
||||
* contrib/hbnf/doc/en/stod.txt
|
||||
* contrib/hbnf/doc/en/sysmem.txt
|
||||
* contrib/hbnf/doc/en/tbwhile.txt
|
||||
* contrib/hbnf/doc/en/tempfile.txt
|
||||
* contrib/hbnf/doc/en/vertmenu.txt
|
||||
* contrib/hbnf/doc/en/vidcur.txt
|
||||
* contrib/hbnf/doc/en/vidmode.txt
|
||||
* contrib/hbnf/doc/en/wda.txt
|
||||
* contrib/hbnf/doc/en/week.txt
|
||||
* contrib/hbnf/doc/en/year.txt
|
||||
* contrib/hbziparc/doc/en/hbziparc.txt
|
||||
* contrib/rddads/doc/en/adsfuncs.txt
|
||||
* contrib/rddads/doc/en/readme.txt
|
||||
* doc/en/1stread.txt
|
||||
* doc/en/array.txt
|
||||
* doc/en/binnum.txt
|
||||
* doc/en/browse.txt
|
||||
* doc/en/command.txt
|
||||
* doc/en/compiler.txt
|
||||
* doc/en/datetime.txt
|
||||
* doc/en/dbdelim.txt
|
||||
* doc/en/dbsdf.txt
|
||||
* doc/en/dbstrux.txt
|
||||
* doc/en/dir.txt
|
||||
* doc/en/diskspac.txt
|
||||
* doc/en/errsys.txt
|
||||
* doc/en/eval.txt
|
||||
* doc/en/file.txt
|
||||
* doc/en/garbage.txt
|
||||
* doc/en/harbext.txt
|
||||
* doc/en/hashes.txt
|
||||
* doc/en/hb_set.txt
|
||||
* doc/en/hbinet.txt
|
||||
* doc/en/hvm.txt
|
||||
* doc/en/idle.txt
|
||||
* doc/en/input.txt
|
||||
* doc/en/lang.txt
|
||||
* doc/en/macro.txt
|
||||
* doc/en/math.txt
|
||||
* doc/en/memo.txt
|
||||
* doc/en/memvar.txt
|
||||
* doc/en/menu.txt
|
||||
* doc/en/misc.txt
|
||||
* doc/en/nation.txt
|
||||
* doc/en/objfunc.txt
|
||||
* doc/en/rdd.txt
|
||||
* doc/en/rdddb.txt
|
||||
* doc/en/rddmisc.txt
|
||||
* doc/en/rddord.txt
|
||||
* doc/en/set.txt
|
||||
* doc/en/setmode.txt
|
||||
* doc/en/string.txt
|
||||
* doc/en/tclass.txt
|
||||
* doc/en/terminal.txt
|
||||
* doc/en/tgetlist.txt
|
||||
* doc/en/tlabel.txt
|
||||
* doc/en/treport.txt
|
||||
* doc/en/var.txt
|
||||
* sync with fixes/updates from 3.4 fork
|
||||
|
||||
2016-10-04 16:22 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt)
|
||||
* contrib/hbwin/hbwin.ch
|
||||
+ WIN_SERVICE_CONTROL_SHUTDOWN define added
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
ctinit()
|
||||
$CATEGORY$
|
||||
CT3 general functions
|
||||
$ONELINER$
|
||||
Initializes the CT3 library
|
||||
$SYNTAX$
|
||||
ctinit() -> lInitialized
|
||||
$ARGUMENTS$
|
||||
None
|
||||
$RETURNS$
|
||||
lInitialized .T. if the function has been correctly initialized
|
||||
$DESCRIPTION$
|
||||
The ctinit() function initializes the CT3 library.
|
||||
Identical code is declared as INIT FUNCTION, thus should be executed
|
||||
automatically at the beginning of the application, but it is a good
|
||||
idea to call it once again explicitly somewhere at the beginning of
|
||||
your program to check the initialization.
|
||||
$EXAMPLES$
|
||||
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
ctinit() is a new function in Harbour's CT3 library.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is hbct.
|
||||
$SEEALSO$
|
||||
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
ctexit()
|
||||
$CATEGORY$
|
||||
CT3 general functions
|
||||
$ONELINER$
|
||||
Uninitializes the CT3 library
|
||||
$SYNTAX$
|
||||
ctexit() -> nil
|
||||
$ARGUMENTS$
|
||||
none
|
||||
$RETURNS$
|
||||
nil
|
||||
$DESCRIPTION$
|
||||
The ctexit() function uninitializes the CT3 library.
|
||||
Identical code is declared as EXIT FUNCTION, thus should be executed
|
||||
automatically at the end of the application, but it is a good idea
|
||||
to call it explicitly somewhere at the end of your program to make
|
||||
sure that the deinitialization takes place.
|
||||
$EXAMPLES$
|
||||
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
ctexit() is a new function in Harbour's CT3 library.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is hbct.
|
||||
$SEEALSO$
|
||||
|
||||
$END$
|
||||
*/
|
||||
@@ -38,65 +38,3 @@
|
||||
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
ctcinit()
|
||||
$CATEGORY$
|
||||
CT3 general functions
|
||||
$ONELINER$
|
||||
Initializes the CT3 library, C part
|
||||
$SYNTAX$
|
||||
ctcinit() -> lInitialized
|
||||
$ARGUMENTS$
|
||||
None
|
||||
$RETURNS$
|
||||
lInitialized .T. if the function has been correctly initialized
|
||||
$DESCRIPTION$
|
||||
The ctcinit() function initializes the C source part of the CT3
|
||||
library. Do not call this function directly.
|
||||
$EXAMPLES$
|
||||
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
ctcinit() is a new function in Harbour's CT3 library.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is hbct.
|
||||
$SEEALSO$
|
||||
ctinit(), ctexit()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
ctcexit()
|
||||
$CATEGORY$
|
||||
CT3 general functions
|
||||
$ONELINER$
|
||||
Uninitializes the CT3 library, C part
|
||||
$SYNTAX$
|
||||
ctcexit() -> NIL
|
||||
$ARGUMENTS$
|
||||
none
|
||||
$RETURNS$
|
||||
nil
|
||||
$DESCRIPTION$
|
||||
The ctcexit() function uninitializes the C part of the CT3 library.
|
||||
Do not call this function directly.
|
||||
$EXAMPLES$
|
||||
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
ctcexit() is a new function in Harbour's CT3 library.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is hbct.
|
||||
$SEEALSO$
|
||||
ctinit(), ctexit()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
|
||||
Be aware that this function is both quite time - O(Len(cString1)*Len(cString2)) - and memory consuming -
|
||||
O((Len(cString1)+1)*(Len(cString2)+1)*sizeof(int)) - so keep the strings as short as possible.
|
||||
E.g., on common 32 bit systems (sizeof(int) == 4), calling StrDiff() with two strings of 1024 bytes
|
||||
in length will consume 4 MB of memory. To not impose unneeded restrictions, the function will only check if
|
||||
E.g., on common 32-bit systems (sizeof(int) == 4), calling StrDiff() with two strings of 1024 bytes
|
||||
in length will consume 4 MiB of memory. To not impose unneeded restrictions, the function will only check if
|
||||
(Len(cString1)+1)*(Len(cString2)+1)*sizeof(int) <= UINT_MAX, although allocing UINT_MAX bytes will not
|
||||
work on most systems. If this simple check fails, -1 is returned.
|
||||
|
||||
|
||||
@@ -231,7 +231,7 @@
|
||||
The TokenExit() function releases the memory associated with the
|
||||
global token environment. One should use it for every TokenInit()
|
||||
using the global TE. Additionally, TokenExit() is implicitly called
|
||||
from ctexit() to free the memory at library shutdown.
|
||||
when the thread or application ends.
|
||||
$EXAMPLES$
|
||||
TokenInit( cString ) // initialize a TE
|
||||
DO WHILE ! TokenEnd()
|
||||
|
||||
@@ -11,15 +11,15 @@
|
||||
<cStr> - The string
|
||||
<nPos> - The position in <cStr>
|
||||
$RETURNS$
|
||||
<nAscVal> - The ascii value of SubStr( <cStr>, <nPos>, 1 )
|
||||
<nAscVal> - The ascii value of hb_BSubStr( <cStr>, <nPos>, 1 )
|
||||
$DESCRIPTION$
|
||||
Return the ascii value of a specified character in a string
|
||||
Equivalent (but much faster) to
|
||||
Asc(SubStr(cStr, nPos, 1)
|
||||
hb_BCode( hb_BSubStr( cStr, nPos, 1 ) )
|
||||
|
||||
NOTE:
|
||||
invalid parameters will return -1
|
||||
nPos > Len( cStr ) will return -2
|
||||
nPos > hb_BLen( cStr ) will return -2
|
||||
|
||||
This last behaviour is different to the Funcky function of the
|
||||
same name. I changed the behaviour because some of the strings
|
||||
@@ -254,8 +254,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"
|
||||
? hb_BChar( gt_ChrFirst( "sa ", "This is a test" ) ) // prints "s"
|
||||
? hb_BChar( gt_ChrFirst( "et" , "This is a test" ) ) // prints "t"
|
||||
$STATUS$
|
||||
R
|
||||
$COMPLIANCE$
|
||||
@@ -686,7 +686,7 @@
|
||||
$EXAMPLES$
|
||||
// Print the setting of the flags in a flag string called ``cDave''
|
||||
|
||||
FOR nFlag := 1 to ( Len( cDave ) * 8 )
|
||||
FOR nFlag := 1 to ( hb_BLen( cDave ) * 8 )
|
||||
? "Flag number ", nFlag, " == ", gt_IsFlag( cDave, nFlag )
|
||||
NEXT
|
||||
$SEEALSO$
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
$ONELINER$
|
||||
Returns an array with the months names.
|
||||
$SYNTAX$
|
||||
AMonths() --> aMonths
|
||||
AMonths() --> aMonths
|
||||
$ARGUMENTS$
|
||||
None
|
||||
$RETURNS$
|
||||
@@ -16,8 +16,8 @@
|
||||
selected current language.
|
||||
$EXAMPLES$
|
||||
aMonths := AMonths()
|
||||
? aMonths[ 1 ] // -> January
|
||||
? aMonths[ 1 ] // -> Enero (if the selected language is Spanish)
|
||||
? aMonths[ 1 ] // -> January
|
||||
? aMonths[ 1 ] // -> Enero (if the selected language is Spanish)
|
||||
$STATUS$
|
||||
R
|
||||
$COMPLIANCE$
|
||||
@@ -39,7 +39,7 @@
|
||||
$ONELINER$
|
||||
Returns an array with the days names.
|
||||
$SYNTAX$
|
||||
ADays() --> aDays
|
||||
ADays() --> aDays
|
||||
$ARGUMENTS$
|
||||
None
|
||||
$RETURNS$
|
||||
@@ -72,7 +72,7 @@
|
||||
$ONELINER$
|
||||
Checks if the given date is a leap year.
|
||||
$SYNTAX$
|
||||
IsLeapYear( <dDate> ) --> lTrueOrFalse
|
||||
IsLeapYear( <dDate> ) --> lTrueOrFalse
|
||||
$ARGUMENTS$
|
||||
<dDate> A valid date.
|
||||
$RETURNS$
|
||||
@@ -81,8 +81,8 @@
|
||||
This function returns true if the given date is a leap year and
|
||||
false if isn't.
|
||||
$EXAMPLES$
|
||||
? IsLeapYear( hb_SToD( "20000101" ) ) // -> .T.
|
||||
? IsLeapYear( hb_SToD( "20010101" ) ) // -> .F.
|
||||
? IsLeapYear( hb_SToD( "20000101" ) ) // -> .T.
|
||||
? IsLeapYear( hb_SToD( "20010101" ) ) // -> .F.
|
||||
$STATUS$
|
||||
R
|
||||
$COMPLIANCE$
|
||||
@@ -104,7 +104,7 @@
|
||||
$ONELINER$
|
||||
Gets the days in a month.
|
||||
$SYNTAX$
|
||||
DaysInMonth( <dDate> ) --> nDays
|
||||
DaysInMonth( <dDate> ) --> nDays
|
||||
$ARGUMENTS$
|
||||
<dDate> A valid date.
|
||||
$RETURNS$
|
||||
@@ -112,8 +112,8 @@
|
||||
$DESCRIPTION$
|
||||
This function returns the number of days of the given date month.
|
||||
$EXAMPLES$
|
||||
? DaysInMonth( hb_SToD( "20000101" ) ) // -> 31
|
||||
? DaysInMonth( hb_SToD( "20000201" ) ) // -> 29
|
||||
? DaysInMonth( hb_SToD( "20000101" ) ) // -> 31
|
||||
? DaysInMonth( hb_SToD( "20000201" ) ) // -> 29
|
||||
$STATUS$
|
||||
R
|
||||
$COMPLIANCE$
|
||||
@@ -135,7 +135,7 @@
|
||||
$ONELINER$
|
||||
Gets the last day in a month.
|
||||
$SYNTAX$
|
||||
EoM( <dDate> ) --> dEOM
|
||||
EoM( <dDate> ) --> dEOM
|
||||
$ARGUMENTS$
|
||||
<dDate> A valid date.
|
||||
$RETURNS$
|
||||
@@ -144,8 +144,8 @@
|
||||
This function returns the last day of a given month date.
|
||||
$EXAMPLES$
|
||||
Set( _SET_DATEFORMAT, "yyyy-mm-dd" )
|
||||
? EoM( hb_SToD( "20000101" ) ) // -> "2000-01-31"
|
||||
? EoM( hb_SToD( "20000201" ) ) // -> "2000-02-29"
|
||||
? EoM( hb_SToD( "20000101" ) ) // -> "2000-01-31"
|
||||
? EoM( hb_SToD( "20000201" ) ) // -> "2000-02-29"
|
||||
$STATUS$
|
||||
R
|
||||
$COMPLIANCE$
|
||||
@@ -167,7 +167,7 @@
|
||||
$ONELINER$
|
||||
Gets the first day in a month.
|
||||
$SYNTAX$
|
||||
BoM( <dDate> ) --> dBOM
|
||||
BoM( <dDate> ) --> dBOM
|
||||
$ARGUMENTS$
|
||||
<dDate> A valid date.
|
||||
$RETURNS$
|
||||
@@ -176,8 +176,8 @@
|
||||
This function returns the first day of a given month date.
|
||||
$EXAMPLES$
|
||||
Set( _SET_DATEFORMAT, "yyyy-mm-dd" )
|
||||
? BoM( hb_SToD( "20000125" ) ) // -> "2000-01-01"
|
||||
? BoM( hb_SToD( "20000224" ) ) // -> "2000-02-01"
|
||||
? BoM( hb_SToD( "20000125" ) ) // -> "2000-01-01"
|
||||
? BoM( hb_SToD( "20000224" ) ) // -> "2000-02-01"
|
||||
$STATUS$
|
||||
R
|
||||
$COMPLIANCE$
|
||||
@@ -199,7 +199,7 @@
|
||||
$ONELINER$
|
||||
Gets the day number of the year.
|
||||
$SYNTAX$
|
||||
DoY( <dDate> ) --> nDay
|
||||
DoY( <dDate> ) --> nDay
|
||||
$ARGUMENTS$
|
||||
<dDate> A valid date.
|
||||
$RETURNS$
|
||||
@@ -207,8 +207,8 @@
|
||||
$DESCRIPTION$
|
||||
This function returns the day number of the year for a given date.
|
||||
$EXAMPLES$
|
||||
? DoY( hb_SToD( "20000131" ) ) // -> 31
|
||||
? DoY( hb_SToD( "20000220" ) ) // -> 51
|
||||
? DoY( hb_SToD( "20000131" ) ) // -> 31
|
||||
? DoY( hb_SToD( "20000220" ) ) // -> 51
|
||||
$STATUS$
|
||||
R
|
||||
$COMPLIANCE$
|
||||
@@ -230,7 +230,7 @@
|
||||
$ONELINER$
|
||||
Gets the week number of the year.
|
||||
$SYNTAX$
|
||||
WoY( <dDate>, <lIso> ) --> nWeek
|
||||
WoY( <dDate>, <lIso> ) --> nWeek
|
||||
$ARGUMENTS$
|
||||
<dDate> A valid date.
|
||||
$RETURNS$
|
||||
@@ -241,8 +241,8 @@
|
||||
It returns the week number in ISO format ( range 0 - 52, by default
|
||||
or passing TRUE as second parameter) or 1 - 52 if lIso is FALSE.
|
||||
$EXAMPLES$
|
||||
? WoY( hb_SToD( "20000131" ) ) // -> 3
|
||||
? WoY( hb_SToD( "20000131" ), .F. ) // -> 4
|
||||
? WoY( hb_SToD( "20000131" ) ) // -> 3
|
||||
? WoY( hb_SToD( "20000131" ), .F. ) // -> 4
|
||||
$STATUS$
|
||||
R
|
||||
$COMPLIANCE$
|
||||
@@ -264,7 +264,7 @@
|
||||
$ONELINER$
|
||||
Gets the last date of the year.
|
||||
$SYNTAX$
|
||||
EoY( <dDate> ) --> dEOY
|
||||
EoY( <dDate> ) --> dEOY
|
||||
$ARGUMENTS$
|
||||
<dDate> A valid date.
|
||||
$RETURNS$
|
||||
@@ -273,8 +273,8 @@
|
||||
This function returns the last date of a given year date.
|
||||
$EXAMPLES$
|
||||
Set( _SET_DATEFORMAT, "yyyy-mm-dd" )
|
||||
? EoY( hb_SToD( "20000101" ) ) // -> "2000-12-31"
|
||||
? EoY( hb_SToD( "20010101" ) ) // -> "2001-12-31"
|
||||
? EoY( hb_SToD( "20000101" ) ) // -> "2000-12-31"
|
||||
? EoY( hb_SToD( "20010101" ) ) // -> "2001-12-31"
|
||||
$STATUS$
|
||||
R
|
||||
$COMPLIANCE$
|
||||
@@ -296,7 +296,7 @@
|
||||
$ONELINER$
|
||||
Gets the first date of the year.
|
||||
$SYNTAX$
|
||||
BoY( <dDate> ) --> dBOY
|
||||
BoY( <dDate> ) --> dBOY
|
||||
$ARGUMENTS$
|
||||
<dDate> A valid date.
|
||||
$RETURNS$
|
||||
@@ -305,8 +305,8 @@
|
||||
This function returns the first date of a given year date.
|
||||
$EXAMPLES$
|
||||
Set( _SET_DATEFORMAT, "yyyy-mm-dd" )
|
||||
? BoY( hb_SToD( "20000125" ) ) // -> "2000-01-01"
|
||||
? BoY( hb_SToD( "20010224" ) ) // -> "2001-01-01"
|
||||
? BoY( hb_SToD( "20000125" ) ) // -> "2000-01-01"
|
||||
? BoY( hb_SToD( "20010224" ) ) // -> "2001-01-01"
|
||||
$STATUS$
|
||||
R
|
||||
$COMPLIANCE$
|
||||
|
||||
@@ -22,45 +22,43 @@
|
||||
|
||||
The class methods are as follows: </par>
|
||||
|
||||
New() Creates a new instance of the TFileRead class. </par>
|
||||
New() Creates a new instance of the TFileRead class. </par>
|
||||
|
||||
Open([<nFlags>]) Opens the file for reading. The optional nFlags
|
||||
parameter can use any of the FOpen() flags from
|
||||
fileio.ch. The default is FO_READ + FO_SHARED.
|
||||
Calling this method when the file is already
|
||||
open causes the next ReadLine() to start over
|
||||
from the beginning of the file. </par>
|
||||
Open( [<nFlags>] ) Opens the file for reading. The optional nFlags
|
||||
parameter can use any of the file open flags from
|
||||
fileio.ch. The default is FO_READ + FO_SHARED.
|
||||
Calling this method when the file is already
|
||||
open causes the next ReadLine() to start over
|
||||
from the beginning of the file. </par>
|
||||
|
||||
Close() Closes the file. </par>
|
||||
Close() Closes the file. </par>
|
||||
|
||||
ReadLine() Returns one line from the file, stripping the
|
||||
newline characters. The following sequences are
|
||||
treated as one newline: 1) CR CR LF; 2) CR LF;
|
||||
3) LF; and 4) CR. Note: LF CR is 2 newlines. </par>
|
||||
Name() Returns the name of the file. </par>
|
||||
ReadLine() Returns one line from the file, stripping the
|
||||
newline characters. The following sequences are
|
||||
treated as one newline: 1) CR CR LF; 2) CR LF;
|
||||
3) LF; and 4) CR. Note: LF CR is 2 newlines. </par>
|
||||
Name() Returns the name of the file. </par>
|
||||
|
||||
IsOpen() Returns .T. if the file is open. </par>
|
||||
IsOpen() Returns .T. if the file is open. </par>
|
||||
|
||||
MoreToRead() Returns .T. if there are more lines to be read
|
||||
(think of it as an inverse EOF function).
|
||||
MoreToRead() Returns .T. if there are more lines to be read
|
||||
(think of it as an inverse EOF function).
|
||||
|
||||
Error() Returns .T. if an error has occurred. </par>
|
||||
Error() Returns .T. if an error has occurred. </par>
|
||||
|
||||
ErrorNo() Returns the current error code. </par>
|
||||
ErrorNo() Returns the current error code. </par>
|
||||
|
||||
ErrorMsg([<cPre>]) Returns a formatted error message. </par>
|
||||
ErrorMsg( [<cPre>] ) Returns a formatted error message. </par>
|
||||
$EXAMPLES$
|
||||
PROCEDURE Main( cFile )
|
||||
LOCAL oFile := TFileRead():New( cFile )
|
||||
|
||||
oFile:Open()
|
||||
IF oFile:Error()
|
||||
OutStd( oFile:ErrorMsg( "FileRead: " ) )
|
||||
OutStd( hb_eol() )
|
||||
? oFile:ErrorMsg( "FileRead:" )
|
||||
ELSE
|
||||
DO WHILE oFile:MoreToRead()
|
||||
OutStd( oFile:ReadLine() )
|
||||
OutStd( hb_eol() )
|
||||
? oFile:ReadLine()
|
||||
ENDDO
|
||||
oFile:Close()
|
||||
ENDIF
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
$ONELINER$
|
||||
Format a string
|
||||
$SYNTAX$
|
||||
StrFormat(<cMask>[, <cPar1>[, <cParn>[, ...]]) --> cString
|
||||
StrFormat( <cMask>[, <cPar1>[, <cParn>[, ...]] ) --> cString
|
||||
$ARGUMENTS$
|
||||
<cMask> Holds the mask for the resulting string </par>
|
||||
<cParn> Holds the strings to be inserted in the mask
|
||||
@@ -22,7 +22,7 @@
|
||||
You can print "%" character with "%%". </par>
|
||||
$EXAMPLES$
|
||||
StrFormat( "Please insert disk %1 to drive %2", hb_ntos( 2 ), "A:" )
|
||||
StrFormat( "This is %1 from %2", "Victor", "Hungary" )
|
||||
StrFormat( "This is %1 from %2", "John", "Earth" )
|
||||
StrFormat( "%2 %1 %2", "Param1", "Param2" )
|
||||
$STATUS$
|
||||
Done
|
||||
|
||||
@@ -23,12 +23,9 @@
|
||||
|
||||
This routine requires ft_ASum().
|
||||
$EXAMPLES$
|
||||
ft_AAvg( aSubTotals ) // Get Average of Entire Array
|
||||
|
||||
ft_AAvg( aSubTotals, 5 ) // Get Average of 5th Element On
|
||||
|
||||
ft_AAvg( aSubTotals, , 10 ) // Get Average of 1st 10 Elements
|
||||
|
||||
ft_AAvg( aSubTotals, 5, 10 ) // Get Average of Elements 5-10
|
||||
? ft_AAvg( aSubTotals ) // Get Average of Entire Array
|
||||
? ft_AAvg( aSubTotals, 5 ) // Get Average of 5th Element On
|
||||
? ft_AAvg( aSubTotals, , 10 ) // Get Average of 1st 10 Elements
|
||||
? ft_AAvg( aSubTotals, 5, 10 ) // Get Average of Elements 5-10
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
$RETURNS$
|
||||
An adjusted date dependent upon mode and work week start day.
|
||||
$DESCRIPTION$
|
||||
Called by other FT_ACCT.. functions. The algorithm is:
|
||||
Called by other ft_Acct*() functions. The algorithm is:
|
||||
|
||||
Beginning of period mode:
|
||||
|
||||
|
||||
@@ -36,16 +36,16 @@
|
||||
'quarter' will contain 14 weeks and the year will contain 53
|
||||
weeks.
|
||||
$EXAMPLES$
|
||||
// get info about accounting month containing 9/15/90
|
||||
// get info about accounting month containing 1990-09-15
|
||||
aDateInfo := ft_AcctMonth( hb_SToD( "19900915" ) )
|
||||
? aDateInfo[ 1 ] // 199009 (9th month)
|
||||
? aDateInfo[ 2 ] // 1990-09-02 beginning of month 9
|
||||
? aDateInfo[ 3 ] // 1990-09-29 end of month 9
|
||||
|
||||
// get info about accounting month 5 in year containing 9/15/90
|
||||
// get info about accounting month 5 in year containing 1990-09-15
|
||||
aDateInfo := ft_AcctMonth( hb_SToD( "19900915" ), 5 )
|
||||
? aDateInfo[ 1 ] // 199005
|
||||
? aDateInfo[ 2 ] // 1989-04-29 beginning of month 5
|
||||
? aDateInfo[ 2 ] // 1990-04-29 beginning of month 5
|
||||
? aDateInfo[ 3 ] // 1990-06-02 end of month 5
|
||||
$SEEALSO$
|
||||
ft_DateCnfg() ft_AcctWeek() ft_AcctQtr() ft_AcctYear()
|
||||
|
||||
@@ -36,13 +36,13 @@
|
||||
'quarter' will contain 14 weeks and the year will contain 53
|
||||
weeks.
|
||||
$EXAMPLES$
|
||||
// get info about accounting month containing 9/15/90
|
||||
// get info about accounting month containing 1990-09-15
|
||||
aDateInfo := ft_AcctQtr( hb_SToD( "19900915" ) )
|
||||
? aDateInfo[ 1 ] // 199003 (3rd quarter)
|
||||
? aDateInfo[ 2 ] // 1990-07-01 beginning of quarter 3
|
||||
? aDateInfo[ 3 ] // 1990-09-29 end of quarter 3
|
||||
|
||||
// get info about accounting qtr. 2 in year containing 9/15/90
|
||||
// get info about accounting qtr. 2 in year containing 1990-09-15
|
||||
aDateInfo := ft_AcctQtr( hb_SToD( "19900915" ), 2 )
|
||||
? aDateInfo[ 1 ] // 199002
|
||||
? aDateInfo[ 2 ] // 1989-04-01 beginning of quarter 2
|
||||
|
||||
@@ -36,13 +36,13 @@
|
||||
'quarter' will contain 14 weeks and the year will contain 53
|
||||
weeks.
|
||||
$EXAMPLES$
|
||||
// get info about accounting week containing 9/15/90
|
||||
// get info about accounting week containing 1990-09-15
|
||||
aDateInfo := ft_AcctWeek( hb_SToD( "19900915" ) )
|
||||
? aDateInfo[ 1 ] // 199037 (37th week)
|
||||
? aDateInfo[ 2 ] // 1990-09-09 beginning of week 37
|
||||
? aDateInfo[ 3 ] // 1990-09-15 end of week 37
|
||||
|
||||
// get info about accounting week 25 in year containing 9/15/90
|
||||
// get info about accounting week 25 in year containing 1990-09-15
|
||||
aDateInfo := ft_AcctWeek( hb_SToD( "19900915" ), 25 )
|
||||
? aDateInfo[ 1 ] // 199025
|
||||
? aDateInfo[ 2 ] // 1989-06-17 beginning of week 25
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
'quarter' will contain 14 weeks and the year will contain 53
|
||||
weeks.
|
||||
$EXAMPLES$
|
||||
// get info about accounting year containing 9/15/90
|
||||
// get info about accounting year containing 1990-09-15
|
||||
aDateInfo := ft_AcctYear( hb_SToD( "19900915" ) )
|
||||
? aDateInfo[ 1 ] // 1990
|
||||
? aDateInfo[ 2 ] // 1989-12-31 beginning of year
|
||||
|
||||
@@ -29,13 +29,13 @@
|
||||
|
||||
DO CASE
|
||||
CASE iVideo == 0
|
||||
QOut( "You have a monochrome adapter." )
|
||||
? "You have a monochrome adapter."
|
||||
CASE iVideo == 1
|
||||
QOut( "You have a CGA adapter." )
|
||||
? "You have a CGA adapter."
|
||||
CASE iVideo == 2
|
||||
QOut( "You have an EGA adapter." )
|
||||
? "You have an EGA adapter."
|
||||
CASE iVideo == 3
|
||||
QOut( "You have a VGA adapter." )
|
||||
? "You have a VGA adapter."
|
||||
ENDCASE
|
||||
$SEEALSO$
|
||||
ft_SetMode()
|
||||
|
||||
@@ -26,18 +26,11 @@
|
||||
This function will measure each element of an array
|
||||
dimension and return the longest element.
|
||||
$EXAMPLES$
|
||||
ft_AEMaxLen( aArray ) // Measure the 1st dimension of an Array
|
||||
|
||||
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
|
||||
|
||||
ft_AEMaxLen( aArray, 3, 5, 9 ) // Measure Elements 5-9 of the
|
||||
// 3rd dimension or subarray
|
||||
|
||||
ft_AEMaxLen( aArray, 3, 5 ) // Measure Elements 5 to last in the
|
||||
// 3rd dimension or subarray
|
||||
? ft_AEMaxLen( aArray ) // Measure the 1st dimension of an Array
|
||||
? 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
|
||||
? ft_AEMaxLen( aArray, 3, 5, 9 ) // Measure Elements 5-9 of the 3rd dimension or subarray
|
||||
? ft_AEMaxLen( aArray, 3, 5 ) // Measure Elements 5 to last in the 3rd dimension or subarray
|
||||
$SEEALSO$
|
||||
ft_AEMinLen()
|
||||
$END$
|
||||
|
||||
@@ -26,15 +26,11 @@
|
||||
This function will measure each element of an array
|
||||
dimension and return the shortest element.
|
||||
$EXAMPLES$
|
||||
ft_AEMinLen( aArray ) // Measure the 1st dimension of an Array
|
||||
|
||||
ft_AEMinLen( aArray, 2 ) // Measure the 2nd dimension of an Array
|
||||
|
||||
ft_AEMinLen( aArray, 2, , 9 ) // Measure Elements 1-9 of 2nd dimension
|
||||
|
||||
ft_AEMinLen( aArray, 3, 5, 9 ) // Measure Elements 5-9 of 3rd dimension
|
||||
|
||||
ft_AEMinLen( aArray, 3, 5 ) // Measure Elements 5 to end of 3rd dimension
|
||||
? ft_AEMinLen( aArray ) // Measure the 1st dimension of an Array
|
||||
? ft_AEMinLen( aArray, 2 ) // Measure the 2nd dimension of an Array
|
||||
? ft_AEMinLen( aArray, 2, , 9 ) // Measure Elements 1-9 of 2nd dimension
|
||||
? ft_AEMinLen( aArray, 3, 5, 9 ) // Measure Elements 5-9 of 3rd dimension
|
||||
? ft_AEMinLen( aArray, 3, 5 ) // Measure Elements 5 to end of 3rd dimension
|
||||
$SEEALSO$
|
||||
ft_AEMaxLen()
|
||||
$END$
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
Alt key is pressed, such as during a MemoEdit().
|
||||
$EXAMPLES$
|
||||
IF ft_Alt()
|
||||
@ 24, 0 SAY "Alt"
|
||||
@ 0, 0 SAY "Alt"
|
||||
ELSE
|
||||
@ 24, 0 SAY " "
|
||||
@ 0, 0 SAY " "
|
||||
ENDIF
|
||||
$SEEALSO$
|
||||
ft_CapLock() ft_Ctrl() ft_NumLock() ft_PrtScr() ft_Shift()
|
||||
|
||||
@@ -27,12 +27,9 @@
|
||||
more reflect a more useful average when there are extreme
|
||||
values in the set.
|
||||
$EXAMPLES$
|
||||
ft_AMedian( aArray ) // Return Median for entire array
|
||||
|
||||
ft_AMedian( aArray, 2 ) // Return Median for elements from 2 to end
|
||||
|
||||
ft_AMedian( aArray, , 9 ) // Return Median for 1st 9 elements
|
||||
|
||||
ft_AMedian( aArray, 8, 40 ) // Return Median for elements 8 to 40
|
||||
? ft_AMedian( aArray ) // Return Median for entire array
|
||||
? ft_AMedian( aArray, 2 ) // Return Median for elements from 2 to end
|
||||
? ft_AMedian( aArray, , 9 ) // Return Median for 1st 9 elements
|
||||
? ft_AMedian( aArray, 8, 40 ) // Return Median for elements 8 to 40
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -28,15 +28,15 @@
|
||||
to the supplied code block, cause that code block to return a .T. value.
|
||||
$EXAMPLES$
|
||||
// Search the Entire Array
|
||||
ft_ANoMatches( aTries, {| x | x <= 100 } )
|
||||
? ft_ANoMatches( aTries, {| x | x <= 100 } )
|
||||
|
||||
// Search from the 5th Element On
|
||||
ft_ANoMatches( aCodes, {| x | Upper( x ) == cCurrentCode }, 5 )
|
||||
? ft_ANoMatches( aCodes, {| x | Upper( x ) == cCurrentCode }, 5 )
|
||||
|
||||
// Search the 1st 10 Elements
|
||||
ft_ANoMatches( aDates, {| x | IS_BETWEEN( Date() - 7, x, Date() + 7 ) }, 10 )
|
||||
? ft_ANoMatches( aDates, {| x | IS_BETWEEN( Date() - 7, x, Date() + 7 ) }, 10 )
|
||||
|
||||
// Search Elements 5-10
|
||||
ft_ANoMatches( aNames, {| x | x <= cLastGoodName }, 5, 10 )
|
||||
? ft_ANoMatches( aNames, {| x | x <= cLastGoodName }, 5, 10 )
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -27,6 +27,6 @@
|
||||
value of the desired type).
|
||||
$EXAMPLES$
|
||||
nNumericValue := ft_XToY( cInputValue, "N" )
|
||||
IF ft_XToY( nInputValue, "L" )
|
||||
lLogicalValue := ft_XToY( nInputValue, "L" )
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
aBlocks[ 2 ] := {|| ar[ 2, nElem ] }
|
||||
aBlocks[ 3 ] := {|| ar[ 3, nElem ] }
|
||||
|
||||
// set up TestGet() as the passed Get Function so FT_ArEdit knows how
|
||||
// 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 ) }
|
||||
|
||||
@@ -21,12 +21,9 @@
|
||||
This function is to sum the elements of a numeric array or to sum the
|
||||
lengths of a character array.
|
||||
$EXAMPLES$
|
||||
ft_ASum( aSubTotals ) // Sum the Entire Array
|
||||
|
||||
ft_ASum( aSubTotals, 5 ) // Sum from the 5th Element On
|
||||
|
||||
ft_ASum( aSubTotals, , 10 ) // Sum the 1st 10 Elements
|
||||
|
||||
ft_ASum( aSubTotals, 5, 10 ) // Sum Elements 5-10
|
||||
? ft_ASum( aSubTotals ) // Sum the Entire Array
|
||||
? ft_ASum( aSubTotals, 5 ) // Sum from the 5th Element On
|
||||
? ft_ASum( aSubTotals, , 10 ) // Sum the 1st 10 Elements
|
||||
? ft_ASum( aSubTotals, 5, 10 ) // Sum Elements 5-10
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -27,11 +27,9 @@
|
||||
cSearch := "t"
|
||||
cTarget := "This is the day that the Lord has made."
|
||||
|
||||
ft_At2( cSearch, cTarget ) // Returns ( 9 )
|
||||
|
||||
ft_At2( cSearch, cTarget, 2 ) // Returns ( 17 )
|
||||
|
||||
ft_At2( cSearch, cTarget, 2, .F. ) // Returns ( 9 )
|
||||
? ft_At2( cSearch, cTarget ) // Returns 9
|
||||
? ft_At2( cSearch, cTarget, 2 ) // Returns 17
|
||||
? ft_At2( cSearch, cTarget, 2, .F. ) // Returns 9
|
||||
$SEEALSO$
|
||||
ft_FindITh(), ft_RAt2()
|
||||
$END$
|
||||
@@ -66,11 +64,9 @@
|
||||
cSearch := "t"
|
||||
cTarget := "This is the day that the Lord has made."
|
||||
|
||||
ft_RAt2( cSearch, cTarget ) // Returns ( 22 )
|
||||
|
||||
ft_RAt2( cSearch, cTarget, 2 ) // Returns ( 20 )
|
||||
|
||||
ft_RAt2( cSearch, cTarget, 2, .F. ) // Returns ( 22 )
|
||||
? ft_RAt2( cSearch, cTarget ) // Returns 22
|
||||
? ft_RAt2( cSearch, cTarget, 2 ) // Returns 20
|
||||
? ft_RAt2( cSearch, cTarget, 2, .F. ) // Returns 22
|
||||
$SEEALSO$
|
||||
ft_FindITh(), ft_At2()
|
||||
$END$
|
||||
|
||||
@@ -33,8 +33,7 @@
|
||||
|
||||
// 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$
|
||||
|
||||
@@ -29,9 +29,7 @@
|
||||
|
||||
? ft_Byt2Bit( hb_BChar( 20 ) ) // byte1: '0001 0100'
|
||||
? ft_Byt2Bit( hb_BChar( 36 ) ) // byte2: '0010 0100'
|
||||
|
||||
? ft_Byt2Bit( ft_ByteAnd( hb_BChar( 20 ), hb_BChar( 36 ) ) )
|
||||
// result: '0000 0100'
|
||||
? ft_Byt2Bit( ft_ByteAnd( hb_BChar( 20 ), hb_BChar( 36 ) ) ) // result: '0000 0100'
|
||||
$SEEALSO$
|
||||
ft_Byt2Hex()
|
||||
$END$
|
||||
|
||||
@@ -26,9 +26,7 @@
|
||||
|
||||
? ft_Byt2Hex( hb_BChar( 20 ) ) // byte1: '14h'
|
||||
? ft_Byt2Hex( hb_BChar( 36 ) ) // byte2: '24h'
|
||||
|
||||
? ft_Byt2Hex( ft_ByteAnd( hb_BChar( 20 ), hb_BChar( 36 ) ) )
|
||||
// result: '04h'
|
||||
? ft_Byt2Hex( ft_ByteAnd( hb_BChar( 20 ), hb_BChar( 36 ) ) ) // result: '04h'
|
||||
$SEEALSO$
|
||||
ft_Byt2Bit()
|
||||
$END$
|
||||
|
||||
@@ -38,14 +38,14 @@
|
||||
increments. Returns an 8 element array of calendar data:
|
||||
|
||||
Element Value
|
||||
[1] Date in current date format.
|
||||
[2] Numeric month number.
|
||||
[3] Numeric day number.
|
||||
[4] Numeric year number.
|
||||
[5] Month in character format.
|
||||
[6] Day of the week in character format.
|
||||
[7] Numeric Julian day.
|
||||
[8] Current time in time format.
|
||||
[ 1 ] Date in current date format.
|
||||
[ 2 ] Numeric month number.
|
||||
[ 3 ] Numeric day number.
|
||||
[ 4 ] Numeric year number.
|
||||
[ 5 ] Month in character format.
|
||||
[ 6 ] Day of the week in character format.
|
||||
[ 7 ] Numeric Julian day.
|
||||
[ 8 ] Current time in time format.
|
||||
|
||||
WARNING: ft_Calendar() uses ft_Shadow() and ft_XBox()
|
||||
from the Nanforum Toolkit!
|
||||
@@ -62,6 +62,5 @@
|
||||
? aRetVal[ 8 ] // Result: 12:45:20
|
||||
$SEEALSO$
|
||||
ft_DayOfYr()
|
||||
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
SEGMENT directives, and also the ENDP and ENDS directives (a very
|
||||
minor task).
|
||||
$EXAMPLES$
|
||||
ft_ChDir( "C:\harbour" )
|
||||
ft_ChDir( hb_ps() )
|
||||
ft_ChDir( ".." + hb_ps() + "hbnf" )
|
||||
? ft_ChDir( "harbour" )
|
||||
? ft_ChDir( hb_ps() )
|
||||
? ft_ChDir( ".." + hb_ps() + "hbnf" )
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -14,16 +14,16 @@
|
||||
into the various CPU registers. The correspondence between
|
||||
registers and array elements is as follows:
|
||||
|
||||
aElement[1] == AX register
|
||||
aElement[2] == BX register
|
||||
aElement[3] == CX register
|
||||
aElement[4] == DX register
|
||||
aElement[5] == SI register
|
||||
aElement[6] == DI register
|
||||
aElement[7] == BP register
|
||||
aElement[8] == DS register
|
||||
aElement[9] == ES register
|
||||
aElement[10] == Flags register
|
||||
aElement[ 1 ] == AX register
|
||||
aElement[ 2 ] == BX register
|
||||
aElement[ 3 ] == CX register
|
||||
aElement[ 4 ] == DX register
|
||||
aElement[ 5 ] == SI register
|
||||
aElement[ 6 ] == DI register
|
||||
aElement[ 7 ] == BP register
|
||||
aElement[ 8 ] == DS register
|
||||
aElement[ 9 ] == ES register
|
||||
aElement[ 10 ] == Flags register
|
||||
$RETURNS$
|
||||
.T. if all parameters valid and the function was able
|
||||
to execute the desired interrupt.
|
||||
@@ -107,7 +107,7 @@
|
||||
// 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[ DS ] := "my_file.ext"
|
||||
aRegs[ DX ] := REG_DS
|
||||
ft_int86( 33, aRegs ) // Make the call to the DOS interrupt
|
||||
|
||||
@@ -132,7 +132,6 @@
|
||||
? aRegs[ DS ] // Display the directory name
|
||||
|
||||
|
||||
|
||||
// For the sake of completeness, here's an example that doesn't use a
|
||||
// string. This one changes the video mode.
|
||||
|
||||
|
||||
@@ -4,41 +4,41 @@
|
||||
$CATEGORY$
|
||||
Menus/Prompts
|
||||
$ONELINER$
|
||||
User Selectable Colour Routine
|
||||
User Selectable Color Routine
|
||||
$SYNTAX$
|
||||
ft_ClrSel( <aClrData>, [ <lClrMode> ], [ <cTestChr> ] -> aClrData
|
||||
$ARGUMENTS$
|
||||
<aClrData> is an array of subarrays, with each subarray containing
|
||||
information about the colour settings.
|
||||
information about the color settings.
|
||||
|
||||
The subarray has the following structure:
|
||||
|
||||
[1] cName is the name of this colour setting i.e. "Pick List"
|
||||
[ 1 ] cName is the name of this color setting i.e. "Pick List"
|
||||
Maximum length is 20 bytes
|
||||
|
||||
[2] cClrStr is the current colour string
|
||||
[ 2 ] cClrStr is the current color string
|
||||
Default is "W/N,N/W,N/N,N/N,N/W"
|
||||
|
||||
If Setting type is "M" (Menu) the colours are...
|
||||
1. Prompt Colour
|
||||
2. Message Colour
|
||||
3. HotKey Colour
|
||||
4. LightBar Colour
|
||||
5. LightBar HotKey Colour
|
||||
If Setting type is "M" (Menu) the colors are...
|
||||
1. Prompt Color
|
||||
2. Message Color
|
||||
3. HotKey Color
|
||||
4. LightBar Color
|
||||
5. LightBar HotKey Color
|
||||
|
||||
Note: While there are many ways to code the individual
|
||||
colour combinations, they should be in the same
|
||||
color combinations, they should be in the same
|
||||
format that gets returned from SetColor(), so
|
||||
the defaults can be found in the colour palette.
|
||||
the defaults can be found in the color palette.
|
||||
|
||||
foreground [+] / background [*]
|
||||
i.e. "GR+/BG*, N/W*, N+/N, , W/N"
|
||||
|
||||
[3] cType is the type of colour setting
|
||||
[ 3 ] cType is the type of color setting
|
||||
Default is "W" (Window)
|
||||
|
||||
T = Title Only 1 colour element
|
||||
D = Desktop Background colour and character
|
||||
T = Title Only 1 color element
|
||||
D = Desktop Background color and character
|
||||
M = Menu For ft_MenuTo() style menus
|
||||
W = Window Windows with radio buttons
|
||||
G = Get For use with @ SAY...
|
||||
@@ -48,33 +48,33 @@
|
||||
W/G/B/A are functionally the same but will provide
|
||||
a more appropriate test display.
|
||||
|
||||
[4] cFillChar is the character (for desktop background only)
|
||||
[ 4 ] cFillChar is the character (for desktop background only)
|
||||
Default is "▒▒▒▒▒▒▒▒▒▒▒▒▒▒"
|
||||
|
||||
|
||||
<lClrMode> .T. use colour palette
|
||||
<lClrMode> .T. use color palette
|
||||
.F. use monochrome palette
|
||||
|
||||
Default is the IsColor() setting
|
||||
|
||||
<cTestChr> 2 Byte character string for colour test display
|
||||
<cTestChr> 2 Byte character string for color test display
|
||||
|
||||
Default is "■■"
|
||||
|
||||
$RETURNS$
|
||||
An array identical to the one passed, with new selected colours
|
||||
An array identical to the one passed, with new selected colors
|
||||
$DESCRIPTION$
|
||||
This function allows users to select their own colour combinations
|
||||
This function allows users to select their own color combinations
|
||||
for all the different types of screen I/O in a typical application.
|
||||
This facilitates an easy implementation of Ted Means' replacement
|
||||
of the @..PROMPT/MENU TO found in the NanForum Toolkit. If you are
|
||||
not using ft_MenuTo(), you can specify "A" for setting type and have
|
||||
a normal colour string returned.
|
||||
a normal color string returned.
|
||||
$EXAMPLES$
|
||||
LOCAL aClrs := {}
|
||||
LOCAL lColour := IsColor()
|
||||
LOCAL aClrs
|
||||
LOCAL lColor := IsColor()
|
||||
|
||||
SET SCOREBOARD OFF
|
||||
Set( _SET_SCOREBOARD, .F. )
|
||||
SetBlink( .F. ) // Allow bright backgrounds
|
||||
|
||||
// .... a typical application might have the following different settings
|
||||
@@ -91,6 +91,6 @@
|
||||
{ "Database Query", "N/BG, N/GR*,,,N+/BG", "B" }, ;
|
||||
{ "Pick List", "N/GR*,W+/B,,, BG/GR*", "A" } }
|
||||
|
||||
aClrs := ft_ClrSel( aClrs, lColour )
|
||||
aClrs := ft_ClrSel( aClrs, lColor )
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
This function returns the state (ON/OFF, TRUE/FALSE) of the CENTURY
|
||||
and optionally sets it ON or OFF.
|
||||
$EXAMPLES$
|
||||
lOldState := ft_SetCentury() // Get current CENTURY Setting
|
||||
? ft_SetCentury() // Get current CENTURY Setting
|
||||
|
||||
lOldState := ft_SetCentury( .T. ) // Get the current CENTURY Setting
|
||||
// and turn it on (set it to TRUE)
|
||||
? ft_SetCentury( .T. ) // Get the current CENTURY Setting
|
||||
// and turn it on (set it to TRUE)
|
||||
|
||||
lOldState := ft_SetCentury( .F. ) // Get the current CENTURY Setting
|
||||
// and turn it off (set it to FALSE)
|
||||
? ft_SetCentury( .F. ) // Get the current CENTURY Setting
|
||||
// and turn it off (set it to FALSE)
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
the Ctrl key is pressed, such as during a MemoEdit().
|
||||
$EXAMPLES$
|
||||
IF ft_Ctrl()
|
||||
@ 24, 0 SAY "Ctrl"
|
||||
@ 0, 0 SAY "Ctrl"
|
||||
ELSE
|
||||
@ 24, 0 SAY " "
|
||||
@ 0, 0 SAY " "
|
||||
ENDIF
|
||||
$SEEALSO$
|
||||
ft_CapLock() ft_NumLock() ft_PrtScr() ft_Shift() ft_Alt()
|
||||
|
||||
@@ -21,9 +21,7 @@
|
||||
notation is returned.
|
||||
$EXAMPLES$
|
||||
? ft_D2E( 12.345, 2 ) // -> 1.23E1
|
||||
|
||||
? ft_D2E( -12.345, 3 ) // -> -1.235E1
|
||||
|
||||
? ft_D2E( 0.00000543, 2 ) // -> 5.43E-6
|
||||
$SEEALSO$
|
||||
ft_E2D()
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
$CATEGORY$
|
||||
Date/Time
|
||||
$ONELINER$
|
||||
Set beginning of year/week for FT_ date functions
|
||||
Set beginning of year/week for ft_*() date functions
|
||||
$SYNTAX$
|
||||
ft_DateCnfg( [ <cFYStart> ], [ <nDow> ] ) -> aDateInfo
|
||||
$ARGUMENTS$
|
||||
@@ -22,11 +22,11 @@
|
||||
$RETURNS$
|
||||
A 2-element array containing the following information:
|
||||
|
||||
aDateInfo[1] - an ANSI date string indicating the beginning
|
||||
aDateInfo[ 1 ] - an ANSI date string indicating the beginning
|
||||
date of the year. Only the month and day are
|
||||
meaningful.
|
||||
|
||||
aDateInfo[2] - the number of the first day of the week
|
||||
aDateInfo[ 2 ] - the number of the first day of the week
|
||||
(1 = Sunday)
|
||||
|
||||
$DESCRIPTION$
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
// Examples of return values:
|
||||
|
||||
// aArray[1] aArray[2]
|
||||
// aArray[ 1 ] aArray[ 2 ]
|
||||
// System date format: American
|
||||
|
||||
SET DATE TO AMERICAN
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
ft_Default( "C" ) // Switch to drive C
|
||||
|
||||
IF !( ft_Default( "E" ) == "E" )
|
||||
QOut( "Drive E does not exist!" )
|
||||
? "Drive E does not exist!"
|
||||
ENDIF
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_DOSVER
|
||||
ft_DosVer()
|
||||
$CATEGORY$
|
||||
DOS/BIOS
|
||||
$ONELINER$
|
||||
@@ -21,11 +21,7 @@
|
||||
It returns a character string corresponding to the DOS
|
||||
version, as follows: The major version, a period ("."), then
|
||||
the minor version.
|
||||
|
||||
|
||||
$EXAMPLES$
|
||||
PROCEDURE Main()
|
||||
? "Dos version: " + ft_DosVer()
|
||||
RETURN
|
||||
? "OS version:", ft_DosVer()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -20,6 +20,6 @@
|
||||
This function can be useful in calender type programs that indicate
|
||||
when holidays occur.
|
||||
$EXAMPLES$
|
||||
dEdate := ft_Easter( 1990 ) // returns 1990-04-15
|
||||
? ft_Easter( 1990 ) // returns 1990-04-15
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
(time 2 - time 1).
|
||||
If time 2 is smaller than time 1, a NEGATIVE value is returned.
|
||||
$EXAMPLES$
|
||||
ft_ElapMin( "1718", "2040" ) -> 322
|
||||
ft_ElapMin( "2040", "1718" ) -> -322
|
||||
? ft_ElapMin( "1718", "2040" ) // 202
|
||||
? ft_ElapMin( "2040", "1718" ) // -202
|
||||
$SEEALSO$
|
||||
ft_ElTime() ft_Mil2Min() ft_Min2Mil()
|
||||
$END$
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
aRetVal[ 3, 1 ] Integer Minutes aRetVal[ 3, 2 ] Total Minutes (nn.nnnn)
|
||||
aRetVal[ 4, 1 ] Integer Seconds aRetVal[ 4, 2 ] Total Seconds (nn)
|
||||
$EXAMPLES$
|
||||
ft_Elapsed( hb_SToD( "19901128" ), hb_SToD( "19901130" ), "08:00:00", "12:10:30" )
|
||||
ft_Elapsed( 0d19901128, 0d19901130, "08:00:00", "12:10:30" )
|
||||
|
||||
// will return:
|
||||
? aRetVal[ 1, 1 ] // -> 2 ( Days ) aRetVal[ 1, 2 ] -> 2.1740 Days
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
Return the absolute difference between two times in hh:mm:ss format
|
||||
in character hours, minutes and seconds (hh:mm:ss).
|
||||
$EXAMPLES$
|
||||
ft_ElTime( "22:40:12", "23:55:17" ) // 01:15:05
|
||||
ft_ElTime( "23:55:17", "22:40:12" ) // 01:15:05
|
||||
? ft_ElTime( "22:40:12", "23:55:17" ) // 01:15:05
|
||||
? ft_ElTime( "23:55:17", "22:40:12" ) // 01:15:05
|
||||
$SEEALSO$
|
||||
ft_ElapMin() ft_Mil2Min() ft_Min2Mil()
|
||||
$END$
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<nWhichOccurrence> is the number of the occurrence to find.
|
||||
|
||||
<lIgnoreCase> is a logical indicating if the search is to be case
|
||||
sensitive. The default is no case sensitivity (.F.).
|
||||
sensitive. The default is no case sensitivity (.T.).
|
||||
$RETURNS$
|
||||
The position in the string cCheckIn of the ith occurrence of cCheckFor.
|
||||
$DESCRIPTION$
|
||||
@@ -27,7 +27,7 @@
|
||||
// the 10th Occurrence of "the", case
|
||||
// insensitive
|
||||
|
||||
nNextPosition := ft_FindITh( "the", cMemoString, 10 )
|
||||
? ft_FindITh( "the", cMemoString, 10 )
|
||||
$SEEALSO$
|
||||
ft_At2()
|
||||
$END$
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
passed, or the first day of the current month if no argument is
|
||||
supplied.
|
||||
$EXAMPLES$
|
||||
dDate := hb_SToD( "19900915" )
|
||||
? ft_FDay( dDate ) // 1990-09-01
|
||||
? ft_FDay( 0d19900915 ) // 1990-09-01
|
||||
? ft_FDay() // 1991-03-01 (current month)
|
||||
$SEEALSO$
|
||||
ft_LDay()
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
$ONELINER$
|
||||
Test diskette drive status
|
||||
$SYNTAX$
|
||||
ft_FlopTst( <nDrive> ) -> nStatus
|
||||
ft_FlopTst( <cDirectory|nDrive> ) -> nStatus
|
||||
$ARGUMENTS$
|
||||
<nDrive> is the diskette drive number, 0 = A:, 1 = B:
|
||||
$RETURNS$
|
||||
@@ -29,13 +29,8 @@
|
||||
No testing has been performed on systems with more than 2 floppy
|
||||
drives. If the third drive is "C" and the fourth "D" then there
|
||||
should be no problems.
|
||||
|
||||
This function does not currently check subst'd drives. So if you
|
||||
have SUBST E: A:\ then ft_FlopTst( Asc( "E" ) - Asc( "A" ) ) == 4
|
||||
Any suggestions to fix this limitation are appreciated.
|
||||
|
||||
$EXAMPLES$
|
||||
iStatus := ft_FlopTst( 0 )
|
||||
iStatus := ft_FlopTst( "A:" )
|
||||
DO CASE
|
||||
CASE iStatus == 1
|
||||
? "The door to drive A is open."
|
||||
|
||||
@@ -4,33 +4,29 @@
|
||||
$CATEGORY$
|
||||
File I/O
|
||||
$ONELINER$
|
||||
Open or close a text file for use by the FT_F* functions
|
||||
Open or close a text file for use by the ft_F*() functions
|
||||
$SYNTAX$
|
||||
ft_FUse( [ <cFile> ] [, <nMode> ] ) -> nHandle | 0
|
||||
|
||||
$ARGUMENTS$
|
||||
^b<cFile>^n is the text file you want to open. If not specified,
|
||||
the file currently open, if any, will be closed.
|
||||
|
||||
^b<nMode>^n is the open mode for the file. Please refer to the
|
||||
discussion of open modes under FOpen() in the Clipper manual
|
||||
and fileio.ch for a list of allowable open modes. If not
|
||||
specified, the file will be opened with a mode of
|
||||
FO_READ + FO_SHARED (64).
|
||||
|
||||
discussion of file open modes in fileio.ch for a list of allowable
|
||||
open modes. If not specified, the file will be opened with a mode
|
||||
of FO_READ + FO_SHARED.
|
||||
$RETURNS$
|
||||
If ^b<cFile>^n is passed and the file is opened successfully, an
|
||||
integer containing the text file's workarea. If the file cannot be
|
||||
opened, -1 will be returned. In this case, check the return value
|
||||
of ^bft_FError()^n for the cause of the error.
|
||||
opened, F_ERROR (-1) will be returned. In this case, check the
|
||||
return value of ^bft_FError()^n for the cause of the error.
|
||||
|
||||
If ft_FUse() is called without any arguments, it will close the
|
||||
text file in the current "text area" and return 0.
|
||||
|
||||
If a read error occurs ^ft_FError()^n will contain the error code.
|
||||
|
||||
$DESCRIPTION$
|
||||
The FT_F*() file functions are for reading text files, that is,
|
||||
The ft_F*() file functions are for reading text files, that is,
|
||||
files where each line (record) is delimited by a CRLF/LF.
|
||||
|
||||
Each file is opened in its own "workarea", similar to the concept
|
||||
@@ -38,7 +34,6 @@
|
||||
workareas) can be opened (assuming there are sufficient file
|
||||
handles available). That number may be increased by modifying
|
||||
the #define TEXT_WORKAREAS in the C source code and recompiling.
|
||||
|
||||
$EXAMPLES$
|
||||
#include "fileio.ch"
|
||||
|
||||
@@ -50,7 +45,6 @@
|
||||
|
||||
// close file
|
||||
ft_FUse()
|
||||
|
||||
$SEEALSO$
|
||||
ft_FUse() ft_FSelect()
|
||||
$END$
|
||||
@@ -65,13 +59,10 @@
|
||||
Select a text file workarea
|
||||
$SYNTAX$
|
||||
ft_FSelect( [ <nNewArea> ] ) -> nPreviousArea
|
||||
|
||||
$ARGUMENTS$
|
||||
^b<nNewArea>^n is the text file workarea to select.
|
||||
|
||||
$RETURNS$
|
||||
The current selected text file area.
|
||||
|
||||
$DESCRIPTION$
|
||||
This function selects a text file "workarea" from 1 to 10. A
|
||||
file may or may not be open in the selected area.
|
||||
@@ -86,12 +77,11 @@
|
||||
handles available). That number may be increased by modifying
|
||||
the #define TEXT_WORKAREAS in the C source code and recompiling.
|
||||
|
||||
All the FT_F*() file functions operate on the file in the currently
|
||||
All the ft_F*() file functions operate on the file in the currently
|
||||
selected text file workarea.
|
||||
|
||||
Text file workareas are separate from and independent of Clipper's
|
||||
database workareas.
|
||||
|
||||
$EXAMPLES$
|
||||
ft_FSelect( 1 )
|
||||
|
||||
@@ -118,28 +108,21 @@
|
||||
Go to the first record in a text file
|
||||
$SYNTAX$
|
||||
ft_FGoTop() -> NIL
|
||||
|
||||
$ARGUMENTS$
|
||||
None
|
||||
|
||||
$RETURNS$
|
||||
NIL
|
||||
|
||||
$DESCRIPTION$
|
||||
This function moves the record pointer to the first record
|
||||
in the currently selected text file workarea.
|
||||
|
||||
A text file "record" is a line of text terminated by a CRLF/LF.
|
||||
|
||||
$EXAMPLES$
|
||||
ft_FUse( "test.txt" ) // open text file
|
||||
|
||||
DO WHILE ! ft_FEof()
|
||||
|
||||
? ft_FReadLn() // read thru file
|
||||
|
||||
ft_FSkip()
|
||||
|
||||
ENDDO
|
||||
|
||||
ft_FGoTop() // go back to top
|
||||
@@ -159,23 +142,20 @@
|
||||
Return the error code for a text file operation
|
||||
$SYNTAX$
|
||||
ft_FError() -> nErrorNo
|
||||
|
||||
$ARGUMENTS$
|
||||
None
|
||||
|
||||
$RETURNS$
|
||||
The DOS error code if one occurred. See a reference on DOS error
|
||||
codes for an explanation of what the code means.
|
||||
|
||||
$DESCRIPTION$
|
||||
This function returns the DOS error code associated with a file
|
||||
operation on the currently selected text file.
|
||||
|
||||
Errors could stem from any open, create, read or write operation,
|
||||
among others.
|
||||
|
||||
$EXAMPLES$
|
||||
IF ft_FUse( "test.txt" ) < 0 // open text file
|
||||
#include "fileio.ch"
|
||||
IF ft_FUse( "test.txt" ) != F_ERROR // open text file
|
||||
err := ft_FError()
|
||||
? "Error opening file 'test.txt', error code (" + ;
|
||||
hb_ntos( err ) + ")"
|
||||
@@ -194,28 +174,21 @@
|
||||
Return the current record number of a text file
|
||||
$SYNTAX$
|
||||
ft_FRecNo() -> nRecNo
|
||||
|
||||
$ARGUMENTS$
|
||||
None
|
||||
|
||||
$RETURNS$
|
||||
The current record number of a text file or 0 if no file is open.
|
||||
|
||||
$DESCRIPTION$
|
||||
This function returns the current record number of the file open
|
||||
in the currently selected text file workarea.
|
||||
|
||||
A text file "record" is a line of text terminated by a CRLF/LF.
|
||||
|
||||
$EXAMPLES$
|
||||
ft_FUse( "test.txt" ) // open text file
|
||||
|
||||
DO WHILE ! ft_FEof()
|
||||
|
||||
? ft_FReadLn() // read thru file
|
||||
|
||||
ft_FSkip()
|
||||
|
||||
ENDDO
|
||||
|
||||
ft_FGoTop() // go back to top
|
||||
@@ -235,13 +208,10 @@
|
||||
Go to the last record in a text file
|
||||
$SYNTAX$
|
||||
ft_FGoBot() -> NIL
|
||||
|
||||
$ARGUMENTS$
|
||||
None
|
||||
|
||||
$RETURNS$
|
||||
NIL
|
||||
|
||||
$DESCRIPTION$
|
||||
This function moves the record pointer to the last record of the
|
||||
file in the currently selected text file workarea.
|
||||
@@ -249,7 +219,6 @@
|
||||
If a read error occurs ^bft_FError()^n will contain the error code.
|
||||
|
||||
A text file "record" is a line of text terminated by a CRLF/LF.
|
||||
|
||||
$EXAMPLES$
|
||||
// read last line
|
||||
ft_FUse( "test.txt" )
|
||||
@@ -271,16 +240,13 @@
|
||||
Move the record pointer to a new position in a text file
|
||||
$SYNTAX$
|
||||
ft_FSkip( [ <nLines> ] ) -> nLinesSkipped
|
||||
|
||||
$ARGUMENTS$
|
||||
<nLines> is the number of lines to skip. Defaults to 1 if
|
||||
not specified.
|
||||
|
||||
$RETURNS$
|
||||
The number of lines actually skipped. If the file's EOF or
|
||||
BOF was encountered before ^b<nLines>^n could be skipped, the
|
||||
return value will be less than ^b<nLines>^n.
|
||||
|
||||
$DESCRIPTION$
|
||||
This function moves the text file record pointer, similar to
|
||||
the CLIPPER SKIP command.
|
||||
@@ -292,18 +258,14 @@
|
||||
If a read error occurs ^ft_FError()^n will contain the error code.
|
||||
|
||||
A text file "record" is a line of text terminated by a CRLF/LF.
|
||||
|
||||
$EXAMPLES$
|
||||
// display each record of a text file
|
||||
|
||||
ft_FUse( "test.txt" )
|
||||
|
||||
DO WHILE ! ft_FEof()
|
||||
|
||||
? ft_FReadLn()
|
||||
|
||||
ft_FSkip()
|
||||
|
||||
ENDDO
|
||||
$SEEALSO$
|
||||
ft_FRecNo() ft_FGoTop()
|
||||
@@ -319,13 +281,10 @@
|
||||
Read a line from the currently selected text file
|
||||
$SYNTAX$
|
||||
ft_FReadLn() -> cLine
|
||||
|
||||
$ARGUMENTS$
|
||||
None
|
||||
|
||||
$RETURNS$
|
||||
A string containing the current record in a text file.
|
||||
|
||||
$DESCRIPTION$
|
||||
This function returns a line of text read from the file in the
|
||||
currently selected text file workarea. Text lines are delimited
|
||||
@@ -340,18 +299,14 @@
|
||||
If a read error occurs ^ft_FError()^n will contain the error code.
|
||||
|
||||
A text file "record" is a line of text terminated by a CRLF/LF.
|
||||
|
||||
$EXAMPLES$
|
||||
// display each record of a text file
|
||||
|
||||
ft_FUse( "test.txt" )
|
||||
|
||||
DO WHILE ! ft_FEof()
|
||||
|
||||
? ft_FReadLn()
|
||||
|
||||
ft_FSkip()
|
||||
|
||||
ENDDO
|
||||
$SEEALSO$
|
||||
ft_FUse() ft_FWriteLn() ft_FRecNo() ft_FGoTop()
|
||||
@@ -367,16 +322,13 @@
|
||||
Deletes a line from the currently selected text file
|
||||
$SYNTAX$
|
||||
ft_FDelete( [ <nLines> ] ) -> lSuccess
|
||||
|
||||
$ARGUMENTS$
|
||||
^b<nLines>^n is the number of lines to be eliminated, beginning with
|
||||
the current record position.
|
||||
|
||||
If ^b<nLines>^n is omitted, the current record is deleted only.
|
||||
|
||||
$RETURNS$
|
||||
TRUE if successful, otherwise check ^bft_FError()^n for error code.
|
||||
|
||||
$DESCRIPTION$
|
||||
This function deletes one or several lines of text from the file
|
||||
in the currently selected text file workarea. Text lines are
|
||||
@@ -384,7 +336,6 @@
|
||||
unless the deleted lines occur at the end of the file, in which
|
||||
case ^bft_FRecNo()^n will equal ^bft_FLastRe()^n and ^bft_FEof()^n
|
||||
will be set to TRUE.
|
||||
|
||||
$EXAMPLES$
|
||||
// delete the next 4 lines from a file
|
||||
ft_FUse( "test.txt" )
|
||||
@@ -404,17 +355,14 @@
|
||||
Inserts a line in the currently selected text file
|
||||
$SYNTAX$
|
||||
ft_FInsert( [ <nLines> ] ) -> lSuccess
|
||||
|
||||
$ARGUMENTS$
|
||||
^b<nLines>^n is the number of lines that should be inserted at the
|
||||
current record position.
|
||||
|
||||
If ^b<nLines>^n is omitted, one record is inserted.
|
||||
|
||||
$RETURNS$
|
||||
^blSuccess^n is TRUE if the insert succeeded, FALSE if not. If
|
||||
false check the return value of ^bft_FError()^n for the reason.
|
||||
|
||||
$DESCRIPTION$
|
||||
This function inserts a line of text in the file in the currently
|
||||
selected text file workarea. Text lines are delimited with a
|
||||
@@ -424,7 +372,6 @@
|
||||
|
||||
A text file "record" is a line of text terminated by a CRLF/LF.
|
||||
Each line inserted with this function will be empty.
|
||||
|
||||
$EXAMPLES$
|
||||
// add a couple of blank lines of text to a file
|
||||
ft_FUse( "test.txt" )
|
||||
@@ -445,17 +392,14 @@
|
||||
$ONELINER$
|
||||
Appends a line to the currently selected text file
|
||||
$SYNTAX$
|
||||
ft_FAppend( [ < nLines > ] ) -> NIL
|
||||
|
||||
ft_FAppend( [ <nLines> ] ) -> NIL
|
||||
$ARGUMENTS$
|
||||
<nLines> is the number of lines that should be appended to the
|
||||
end of the currently selected text file.
|
||||
|
||||
If <nLines> is omitted, one record is appended.
|
||||
|
||||
$RETURNS$
|
||||
lSuccess. If FALSE, check ^bft_FError()^n for the error code.
|
||||
|
||||
$DESCRIPTION$
|
||||
This function appends a line of text to the file in the currently
|
||||
selected text file workarea. Text lines are delimited with a
|
||||
@@ -474,7 +418,6 @@
|
||||
last line in the text file is not terminated with a CRLF/LF prior
|
||||
to calling ft_FAppend(), the function will terminate that last line
|
||||
before appending any new lines.
|
||||
|
||||
$EXAMPLES$
|
||||
// add a blank line of text to a file
|
||||
ft_FUse( "test.txt" )
|
||||
@@ -497,8 +440,7 @@
|
||||
$ONELINER$
|
||||
Write a line to the currently selected text file
|
||||
$SYNTAX$
|
||||
ft_FWriteLn( < cData >, [ < lInsert > ] ) -> lSuccess
|
||||
|
||||
ft_FWriteLn( <cData>, [ <lInsert> ] ) -> lSuccess
|
||||
$ARGUMENTS$
|
||||
<cData> is a string of data to write to the file at the current
|
||||
record position.
|
||||
@@ -510,10 +452,8 @@
|
||||
|
||||
If lInsert is .F. or omitted, the current record is replaced by
|
||||
cData.
|
||||
|
||||
$RETURNS$
|
||||
TRUE if successful, otherwise check ^ft_FError()^n for error code.
|
||||
|
||||
$DESCRIPTION$
|
||||
This function writes a line of text to the file in the currently
|
||||
selected text file workarea. Text lines are delimited with a
|
||||
@@ -527,16 +467,13 @@
|
||||
ft_FInsert()).
|
||||
|
||||
A text file "record" is a line of text terminated by a CRLF/LF.
|
||||
|
||||
$EXAMPLES$
|
||||
// write a line of text to a file
|
||||
|
||||
ft_FUse( "config.sys" )
|
||||
|
||||
DO WHILE !( Left( Upper( ft_FReadLn() ), Len( "FILES=" ) ) == "FILES=" ) .AND. ! ft_FEof()
|
||||
|
||||
DO WHILE ! hb_LeftEqI( ft_FReadLn(), "FILES=" ) .AND. ! ft_FEof()
|
||||
ft_FSkip()
|
||||
|
||||
ENDDO
|
||||
|
||||
ft_FWriteLn( "FILES=30", ft_FEof() )
|
||||
@@ -554,20 +491,16 @@
|
||||
Get the no. of records in the currently selected text file
|
||||
$SYNTAX$
|
||||
ft_FLastRe() -> nLastRecordNum
|
||||
|
||||
$ARGUMENTS$
|
||||
None
|
||||
|
||||
$RETURNS$
|
||||
An integer containing the number of records in the text file in
|
||||
the currently selected text file workarea, or zero if no file
|
||||
is currently open in the workarea.
|
||||
|
||||
$DESCRIPTION$
|
||||
This function returns the number of the last record in a text file.
|
||||
|
||||
A text file "record" is a line of text terminated by a CRLF/LF.
|
||||
|
||||
$EXAMPLES$
|
||||
ft_FUse( "test.txt" )
|
||||
|
||||
@@ -586,19 +519,15 @@
|
||||
Determine if end of text file has been encountered
|
||||
$SYNTAX$
|
||||
ft_FEof() -> lResult
|
||||
|
||||
$ARGUMENTS$
|
||||
None
|
||||
|
||||
$RETURNS$
|
||||
.T. if an attempt was made to skip past the last record of
|
||||
the currently selected text file, otherwise .F.
|
||||
|
||||
$DESCRIPTION$
|
||||
This function is similar to the CLIPPER Eof() function.
|
||||
|
||||
A text file "record" is a line of text terminated by a CRLF/LF.
|
||||
|
||||
$EXAMPLES$
|
||||
ft_FUse( "test.txt" )
|
||||
|
||||
@@ -621,19 +550,15 @@
|
||||
Determine if attempt to skip past beginning of text file
|
||||
$SYNTAX$
|
||||
ft_FBof() -> lResult
|
||||
|
||||
$ARGUMENTS$
|
||||
None
|
||||
|
||||
$RETURNS$
|
||||
.T. if an attempt was made to skip past the first record of
|
||||
the currently selected text file, otherwise .F.
|
||||
|
||||
$DESCRIPTION$
|
||||
This function is similar to the Clipper Bof() function.
|
||||
|
||||
A text file "record" is a line of text terminated by a CRLF/LF.
|
||||
|
||||
$EXAMPLES$
|
||||
ft_FUse( "test.txt" )
|
||||
|
||||
@@ -658,13 +583,10 @@
|
||||
Move record pointer to specific record in a text file
|
||||
$SYNTAX$
|
||||
ft_FGoto( nLine ) -> NIL
|
||||
|
||||
$ARGUMENTS$
|
||||
<nLine> is the record number to go to.
|
||||
|
||||
$RETURNS$
|
||||
NIL
|
||||
|
||||
$DESCRIPTION$
|
||||
This function moves the record pointer to a specific record
|
||||
in the file in the currently selected text file workarea. If
|
||||
@@ -682,7 +604,6 @@
|
||||
delay as ft_FGoto( 0 ) skips through the file.
|
||||
|
||||
A text file "record" is a line of text terminated by a CRLF/LF.
|
||||
|
||||
$EXAMPLES$
|
||||
// read 5th line of text from file
|
||||
|
||||
@@ -690,7 +611,7 @@
|
||||
|
||||
ft_FGoto( 5 )
|
||||
|
||||
cText := ft_FReadLn()
|
||||
? ft_FReadLn()
|
||||
$SEEALSO$
|
||||
ft_FRecNo() ft_FGoTop() ft_FReadLn()
|
||||
$END$
|
||||
|
||||
@@ -52,11 +52,9 @@
|
||||
MemoWrit( "environ.txt", cEnvBlock )
|
||||
|
||||
// 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[ 1 ]
|
||||
? aEnvArray[ 2 ]
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
Converts a hexadecimal number to a BASE 10 decimal number.
|
||||
Useful for using ft_int86().
|
||||
$EXAMPLES$
|
||||
ft_int86( HEX2DEC( "21" ), aRegs )
|
||||
ft_int86( ft_Hex2Dex( "21" ), aRegs )
|
||||
|
||||
// Converts 21h, the Dos Interrupt, to its decimal equivalent,
|
||||
// 33, for use by ft_int86().
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
idle states. This function allows you "announce" to the operating
|
||||
system that your application is idle.
|
||||
|
||||
Note that if you use this function in conjunction with FT_OnIdle(),
|
||||
Note that if you use this function in conjunction with ft_OnIdle(),
|
||||
you can cause Clipper to automatically release the CPU whenever
|
||||
Clipper itself detects an idle state.
|
||||
$EXAMPLES$
|
||||
@@ -27,10 +27,10 @@
|
||||
|
||||
// Here's another way to do it:
|
||||
|
||||
FT_OnIdle( {|| ft_IAmIdle() } )
|
||||
ft_OnIdle( {|| ft_IAmIdle() } )
|
||||
|
||||
Inkey( 0 ) // Automatically reports idleness until key is pressed!
|
||||
$SEEALSO$
|
||||
FT_OnIdle()
|
||||
ft_OnIdle()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -26,14 +26,11 @@
|
||||
this fact makes you uncomfortable then don't use this function, you
|
||||
miserable jello-spined lump of human debris.
|
||||
$EXAMPLES$
|
||||
DO WHILE Whatever // Some batch process
|
||||
|
||||
DO WHILE Whatever // Some batch process
|
||||
Something() // Create 'n' discard a bunch of stuff
|
||||
|
||||
ft_Idle() // Take out the garbage
|
||||
|
||||
ENDDO
|
||||
$SEEALSO$
|
||||
FT_OnIdle()
|
||||
ft_OnIdle()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
SEGMENT directives, and also the ENDP and ENDS directives (a very
|
||||
minor task).
|
||||
$EXAMPLES$
|
||||
byte := ft_inp( 100 ) // read a byte from port 100 (064h)
|
||||
? ft_inp( 100 ) // read a byte from port 100 (064h)
|
||||
$SEEALSO$
|
||||
ft_outp()
|
||||
$END$
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
This function inverts a passed color (in the Clipper format: ??/??),
|
||||
e.g., "W/N" is converted to "N/W".
|
||||
$EXAMPLES$
|
||||
cInverse := ft_InvClr() // Get Inverse of Current Color
|
||||
cInvErr := ft_InvClr( cErrColor ) // Get Inverse of cErrorColor
|
||||
? ft_InvClr() // Get Inverse of Current Color
|
||||
? ft_InvClr( cErrColor ) // Get Inverse of cErrorColor
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -54,8 +54,8 @@
|
||||
? "Check the device on COM2. Something is wrong."
|
||||
ENDIF
|
||||
|
||||
IF ! ft_IsPrint( "A:\nul" )
|
||||
? "Oops, better check drive A!"
|
||||
IF ! ft_IsPrint( "/dev/lp0" )
|
||||
? "Oops, not available."
|
||||
ENDIF
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
passed, or the last day of the current month if no argument is
|
||||
supplied.
|
||||
$EXAMPLES$
|
||||
dDate := hb_SToD( "19900915" )
|
||||
? ft_LDay( dDate ) // 1990-09-30
|
||||
? ft_LDay( 0d19900915 ) // 1990-09-30
|
||||
? ft_LDay() // 1991-03-31 (current month)
|
||||
$SEEALSO$
|
||||
ft_FDay()
|
||||
|
||||
@@ -28,10 +28,8 @@
|
||||
For instance: there is no function called SORT() in any of the
|
||||
Nantucket Libraries, but it is a valid CLIPPER command because the
|
||||
preprocessor will convert it to other function calls.
|
||||
|
||||
|
||||
$EXAMPLES$
|
||||
cString := "FT_GoodFunc( BadFunc( 3, 2 ) )"
|
||||
cString := "ft_GoodFunc( BadFunc( 3, 2 ) )"
|
||||
IF ft_Linked( cString )
|
||||
Eval( &( "{||" + cString + "}" ) )
|
||||
ELSE
|
||||
|
||||
@@ -27,12 +27,12 @@
|
||||
it will return the EOM of calculated month. Otherwise it will
|
||||
return the same day as the day of the passed date.
|
||||
$EXAMPLES$
|
||||
dDate := hb_SToD( "19900915" )
|
||||
dDate := 0d19900915
|
||||
? ft_MAdd( dDate, 1 ) // 1990-10-15
|
||||
? ft_MAdd( dDate, -2 ) // 1990-07-15
|
||||
|
||||
// force EOM
|
||||
dDate := hb_SToD( "19910430" )
|
||||
dDate := 0d19910430
|
||||
? ft_MAdd( dDate, 1 ) // 1991-05-30
|
||||
? ft_MAdd( dDate, 1, .T. ) // 1991-05-31 <- forced EOM
|
||||
? ft_MAdd( dDate, 2 ) // 1991-06-30
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
$DESCRIPTION$
|
||||
ft_Menu1() is a function that displays a pulldown menu for each item
|
||||
on the menu bar and executes the corresponding function for the item
|
||||
selected. When a called function returns false, FT_MENU1 returns
|
||||
selected. When a called function returns false, ft_Menu1() returns
|
||||
control to the calling program.
|
||||
|
||||
Valid keystrokes and their corresponding actions:
|
||||
@@ -91,16 +91,16 @@
|
||||
// <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
|
||||
// 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
|
||||
// .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.
|
||||
|
||||
// CALL FT_MENU1
|
||||
// CALL ft_Menu1()
|
||||
ft_Menu1( aBar, aOptions, aColors, 0 )
|
||||
|
||||
// NOTE: ft_Menu1() disables Alt-C and Alt-D in order to make them
|
||||
@@ -132,7 +132,7 @@
|
||||
<bFunction> is the code block to be executed when that menu
|
||||
option is selected. i.e. {|| MyFunction() } would execute
|
||||
the function called MyFunction(). {|| .F. } would exit the
|
||||
FT_MENU1 and return to the calling routine. {|| .T. } would
|
||||
ft_Menu1() and return to the calling routine. {|| .T. } would
|
||||
do nothing.
|
||||
|
||||
<lSelectable> is a logical variable that determines whether
|
||||
|
||||
@@ -181,8 +181,7 @@
|
||||
#include "ftmenuto.ch"
|
||||
|
||||
// Simple command
|
||||
|
||||
MENU TO MEMVAR
|
||||
MENU TO memvar
|
||||
$INCLUDE$
|
||||
ftmenuto.ch
|
||||
$SEEALSO$
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
USE persons
|
||||
INDEX ON ft_Metaph( LastName ) TO lastname
|
||||
SEEK ft_Metaph( "Philmore" )
|
||||
? Found(), LastName // Result: .T. Philmore
|
||||
? Found(), field->LastName // Result: .T. Philmore
|
||||
SEEK ft_Metaph( "Fillmore" )
|
||||
? Found(), LastName // Result: .T. Philmore
|
||||
? Found(), field->LastName // Result: .T. Philmore
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
$DESCRIPTION$
|
||||
Converts time in military format to number of minute of the day.
|
||||
$EXAMPLES$
|
||||
ft_Mil2Min( "1729" ) // 1049
|
||||
? ft_Mil2Min( "1729" ) // 1049
|
||||
$SEEALSO$
|
||||
ft_Min2Mil() ft_Civ2Mil() ft_Mil2Civ() ft_Sys2Mil()
|
||||
$END$
|
||||
@@ -36,7 +36,7 @@
|
||||
$DESCRIPTION$
|
||||
Converts minute of the day to military format time.
|
||||
$EXAMPLES$
|
||||
ft_Min2Mil( 279 ) // 0439
|
||||
? ft_Min2Mil( 279 ) // 0439
|
||||
$SEEALSO$
|
||||
ft_Mil2Min() ft_Mil2Civ() ft_Civ2Mil() ft_Sys2Mil()
|
||||
$END$
|
||||
@@ -59,15 +59,11 @@
|
||||
$DESCRIPTION$
|
||||
Converts time from military to civilian format
|
||||
$EXAMPLES$
|
||||
ft_Mil2Civ( "1640" ) // 4:40 pm
|
||||
|
||||
ft_Mil2Civ( "0440" ) // 4:40 am
|
||||
|
||||
ft_Mil2Civ( "1200" ) // 12:00 n
|
||||
|
||||
ft_Mil2Civ( "0000" ) // 12:00 m
|
||||
|
||||
ft_Mil2Civ( "2400" ) // 12:00 m
|
||||
? ft_Mil2Civ( "1640" ) // 4:40 pm
|
||||
? ft_Mil2Civ( "0440" ) // 4:40 am
|
||||
? ft_Mil2Civ( "1200" ) // 12:00 n
|
||||
? ft_Mil2Civ( "0000" ) // 12:00 m
|
||||
? ft_Mil2Civ( "2400" ) // 12:00 m
|
||||
|
||||
Caution: leading blanks are irrelevant.
|
||||
$SEEALSO$
|
||||
@@ -92,13 +88,10 @@
|
||||
$DESCRIPTION$
|
||||
Converts time from 12-hour civilian format to military.
|
||||
$EXAMPLES$
|
||||
ft_Civ2Mil( " 5:40 pm" ) // 1740
|
||||
|
||||
ft_Civ2Mil( " 5:40 am" ) // 0540
|
||||
|
||||
ft_Civ2Mil( "12:00 n" ) // 1200
|
||||
|
||||
ft_Civ2Mil( "12:00 m" ) // 0000
|
||||
? ft_Civ2Mil( " 5:40 pm" ) // 1740
|
||||
? ft_Civ2Mil( " 5:40 am" ) // 0540
|
||||
? ft_Civ2Mil( "12:00 n" ) // 1200
|
||||
? ft_Civ2Mil( "12:00 m" ) // 0000
|
||||
|
||||
// Caution: leading blanks are irrelevant; p,a,n,m must be preceded by
|
||||
// one and only one space.
|
||||
@@ -123,7 +116,7 @@
|
||||
$DESCRIPTION$
|
||||
Return current system time as character string in military format.
|
||||
$EXAMPLES$
|
||||
ft_Sys2Mil() // 1623
|
||||
? ft_Sys2Mil() // 1623
|
||||
$SEEALSO$
|
||||
ft_Mil2Civ() ft_Civ2Mil()
|
||||
$END$
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
Converts numeric minutes into a character array containing
|
||||
days, hours & minutes.
|
||||
$EXAMPLES$
|
||||
aDHM_ := MIN2DHM( 16789 ) // aDHM_[ 1 ] = 11, aDHM_[ 2 ] = 15, aDHM_[ 3 ] = 49
|
||||
aDHM_ := ft_Min2Dhm( 16789 )
|
||||
? aDHM_[ 1 ] // 11
|
||||
? aDHM_[ 2 ] // 15
|
||||
? aDHM_[ 3 ] // 49
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
SEGMENT directives, and also the ENDP and ENDS directives (a very
|
||||
minor task).
|
||||
$EXAMPLES$
|
||||
ft_MkDir( "C:\clipper" )
|
||||
ft_MkDir( "\example" )
|
||||
ft_MkDir( "..\source" )
|
||||
? ft_MkDir( "harbour" )
|
||||
? ft_MkDir( hb_ps() + "example" )
|
||||
? ft_MkDir( ".." + hb_ps() + "source" )
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -34,13 +34,13 @@
|
||||
to January 1 and Sunday by calling ft_DateCnfg() with no
|
||||
parameters.
|
||||
$EXAMPLES$
|
||||
// get info about month containing 9/15/90
|
||||
// get info about month containing 1990-09-15
|
||||
aDateInfo := ft_Month( hb_SToD( "19900915" ) )
|
||||
? aDateInfo[ 1 ] // 199009 (9th month)
|
||||
? aDateInfo[ 2 ] // 1990-09-01 beginning of month 9
|
||||
? aDateInfo[ 3 ] // 1990-09-30 end of week month 9
|
||||
|
||||
// get info about month 5 in year containing 9/15/90
|
||||
// get info about month 5 in year containing 1990-09-15
|
||||
aDateInfo := ft_Month( hb_SToD( "19900915" ), 5 )
|
||||
? aDateInfo[ 1 ] // 199005
|
||||
? aDateInfo[ 2 ] // 1990-05-01 beginning of month 5
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
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
|
||||
@@ -127,10 +127,10 @@
|
||||
$DESCRIPTION$
|
||||
This function tells the mouse driver to hide the cursor if it is in
|
||||
the given region. The driver hides the cursor by decrementing the cursor
|
||||
flag. A call to FT_MSHOWCRS is required to turn the cursor back on.
|
||||
Calling FT_MSHOWCRS also disables this function.
|
||||
flag. A call to ft_MShowCrs() is required to turn the cursor back on.
|
||||
Calling ft_MShowCrs() also disables this function.
|
||||
|
||||
See FT_MSHOWCRS for a discussion of the cursor display flag.
|
||||
See ft_MShowCrs() for a discussion of the cursor display flag.
|
||||
$EXAMPLES$
|
||||
ft_MCOnOff( 10, 10, 11, 20 )
|
||||
$SEEALSO$
|
||||
@@ -213,7 +213,7 @@
|
||||
movement values are documented to be the number of mickeys per 8
|
||||
pixels and the double speed value as the number mickeys per second
|
||||
required to double the speed. Each of these values should range from 1
|
||||
to 32K but the driver forces a maximum of 100. Also the documentation
|
||||
to 32000 but the driver forces a maximum of 100. Also the documentation
|
||||
states that resetting the mouse will reset these values. This is not
|
||||
the case.
|
||||
|
||||
@@ -314,7 +314,7 @@
|
||||
NIL
|
||||
$DESCRIPTION$
|
||||
This function sets the display page for the mouse cursor. The valid
|
||||
values of nPage is dependent upon the display mode. See ft_SetVpg()
|
||||
values of nPage is dependent upon the display mode. See ft_SetVPg()
|
||||
for changing the current video page
|
||||
$EXAMPLES$
|
||||
ft_MSetPage( 1 ) // Sets the mouse cursor to page 1
|
||||
@@ -339,7 +339,7 @@
|
||||
displayed
|
||||
$DESCRIPTION$
|
||||
This function gets the display page for the mouse cursor. The valid
|
||||
values of nPage is dependent upon the display mode. See ft_SetVpg()
|
||||
values of nPage is dependent upon the display mode. See ft_SetVPg()
|
||||
for changing the current video page
|
||||
$EXAMPLES$
|
||||
nPage := ft_MGetPage( ) // Gets the mouse cursor display page
|
||||
@@ -782,8 +782,8 @@
|
||||
the actual hardware cursor. This routine allows one choose between them.
|
||||
The software cursor is the default and its effect on the character it
|
||||
covers is determined by the screen mask and the cursor mask. Both of
|
||||
these masks are 16 bit values (which in Clipper are passed as standard
|
||||
numerical values). The 16 bit masks are arranged in a manner identical
|
||||
these masks are 16-bit values (which in Clipper are passed as standard
|
||||
numerical values). The 16-bit masks are arranged in a manner identical
|
||||
to the way information is stored for each character cell on the screen.
|
||||
The low order 8 bits represent the actual character displayed while the
|
||||
high order bits represent the display atributes such as blinking,
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
This function is useful for converting a number to a Clipper color
|
||||
string.
|
||||
$EXAMPLES$
|
||||
cColor := ft_Color2N( 239 ) // returns "*+w/gr"
|
||||
? ft_Color2N( 239 ) // returns "*+w/gr"
|
||||
$SEEALSO$
|
||||
ft_N2Color()
|
||||
$END$
|
||||
|
||||
@@ -34,9 +34,11 @@
|
||||
also the FutureValue and PresentValue for further explanations.
|
||||
The formula to calculate the net present value is:
|
||||
|
||||
NetPresentValue := SUM( CashFlow[ i ] / ( ( 1 + InterestRate ) ** i ) )
|
||||
NetPresentValue := SUM( CashFlow[ i ] / ( ( 1 + InterestRate ) ^ i ) )
|
||||
FOR i := 1 TO NoOfCashFlows
|
||||
//
|
||||
NEXT
|
||||
$EXAMPLES$
|
||||
nNetPresentValue := ft_NetPV( 10000, 10, { 10000, 15000, 16000, 17000 } )
|
||||
? ft_NetPV( 10000, 10, { 10000, 15000, 16000, 17000 } )
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
Find the number of times one string occurs in another
|
||||
$SYNTAX$
|
||||
ft_NoOccur( <cCheckFor>, <cCheckIn> ;
|
||||
[, <lIgnoreCase> ] ) -> <nOccurrences>
|
||||
[, <lIgnoreCase> ] ) -> <nOccurrences>
|
||||
$ARGUMENTS$
|
||||
<cCheckFor> is the string to search for
|
||||
|
||||
<cCheckIn> is the string to search
|
||||
|
||||
<lIgnoreCase> is a boolean variable to force case sensitivity
|
||||
(optional, defaults to .F.).
|
||||
(optional, defaults to .T.).
|
||||
$RETURNS$
|
||||
The number of times <cCheckFor> appears in <cCheckIn>
|
||||
$DESCRIPTION$
|
||||
@@ -23,12 +23,10 @@
|
||||
$EXAMPLES$
|
||||
// Find the number of times "the" appears in cMemoString, case
|
||||
// insensitive
|
||||
|
||||
nNoOfOccurrences := ft_NoOccur( "the", cMemoString )
|
||||
? ft_NoOccur( "the", cMemoString )
|
||||
|
||||
// Find the number of times "the" appears in cMemoString, case
|
||||
// sensitive
|
||||
|
||||
nNoOfOccurrences := ft_NoOccur( "the", cMemoString, .T. )
|
||||
? ft_NoOccur( "the", cMemoString, .F. )
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
$DESCRIPTION$
|
||||
Translates numeric input to a text string.
|
||||
|
||||
FT_NTOW is intended to be used with integers only. Since I don't
|
||||
ft_NToW() is intended to be used with integers only. Since I don't
|
||||
know what your application will be, I can't assume the type of
|
||||
fraction you want returned (ninety nine cents, 99/100, .99, etc).
|
||||
If you want the fraction in words, just pass it as an integer.
|
||||
|
||||
@@ -25,6 +25,6 @@
|
||||
This function does NOT test for the existence of the NetWare shell.
|
||||
The behavior is undefined if no shell is loaded.
|
||||
$EXAMPLES$
|
||||
? "Logical station: " + Str( ft_NWLStat() )
|
||||
? "Logical station:", ft_NWLStat()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -82,8 +82,8 @@
|
||||
@nHandle, @nOpenCnt )
|
||||
|
||||
IF nRc != 0
|
||||
? "Error: " + Str( nRc )
|
||||
QUIT
|
||||
? "Error:", nRc
|
||||
RETURN
|
||||
ENDIF
|
||||
$SEEALSO$
|
||||
ft_NWSemEx() ft_NWSemWait() ft_NWSemSig() ft_NWSemClose() ft_NWSemLock()
|
||||
@@ -130,7 +130,7 @@
|
||||
nRc := ft_NWSemWait( nHandle )
|
||||
IF nRc == 254
|
||||
? "All slots for this resource are currently in use"
|
||||
QUIT
|
||||
RETURN
|
||||
ENDIF
|
||||
|
||||
ft_NWSemEx( nHandle, @nValue, @nOpenCnt )
|
||||
@@ -174,7 +174,7 @@
|
||||
nRc := ft_NWSemWait( nHandle )
|
||||
IF nRc == 254
|
||||
? "All slots for this resource are currently in use"
|
||||
QUIT
|
||||
RETURN
|
||||
ENDIF
|
||||
$SEEALSO$
|
||||
ft_NWSemOpen() ft_NWSemEx() ft_NWSemSig() ft_NWSemClose() ft_NWSemLock()
|
||||
@@ -206,7 +206,7 @@
|
||||
|
||||
For more information, see the description under ft_NWSemOpen().
|
||||
$EXAMPLES$
|
||||
? "Signal returns: " + Str( ft_NWSemSig( nHandle ) )
|
||||
? "Signal returns:", ft_NWSemSig( nHandle )
|
||||
$SEEALSO$
|
||||
ft_NWSemOpen() ft_NWSemEx() ft_NWSemWait() ft_NWSemClose() ft_NWSemLock()
|
||||
$END$
|
||||
@@ -234,7 +234,7 @@
|
||||
the open count for the semaphore. If the open count hits zero,
|
||||
the semaphore is deleted by NetWare.
|
||||
$EXAMPLES$
|
||||
? "Close returns: " + Str( ft_NWSemClose( nHandle ) )
|
||||
? "Close returns:", ft_NWSemClose( nHandle )
|
||||
$SEEALSO$
|
||||
ft_NWSemOpen() ft_NWSemEx() ft_NWSemWait() ft_NWSemSig() ft_NWSemLock()
|
||||
$END$
|
||||
@@ -248,7 +248,7 @@
|
||||
$ONELINER$
|
||||
Perform a semaphore "lock"
|
||||
$SYNTAX$
|
||||
FT_NWSEMLOCK ( <cSemaphore>, <@nHandle> ) -> lRet
|
||||
ft_NWSemLock( <cSemaphore>, <@nHandle> ) -> lRet
|
||||
$ARGUMENTS$
|
||||
<cSemaphore> is the name of a semaphore you want to "lock."
|
||||
<nHandle> is the semaphore's handle, if you get the lock.
|
||||
|
||||
@@ -31,12 +31,12 @@
|
||||
The behavior is undefined if no shell is loaded. You'll usually get
|
||||
garbage. This function has not been tested on NetWare 386.
|
||||
$EXAMPLES$
|
||||
? "I am: " + ft_NWUID()
|
||||
? "I am:", ft_NWUID()
|
||||
|
||||
FOR x := 1 TO 100
|
||||
cUid := ft_NWUID( x )
|
||||
IF ! Empty( cUid )
|
||||
? Str( x, 3 ) + Space( 3 ) + cUid
|
||||
? Str( x, 3 ), cUid
|
||||
ENDIF
|
||||
NEXT
|
||||
$END$
|
||||
|
||||
@@ -21,11 +21,9 @@
|
||||
of the currently executing file, so that you may take whatever
|
||||
action you need to.
|
||||
$EXAMPLES$
|
||||
cMyFile := ft_Origin()
|
||||
|
||||
IF !( cMyFile == "C:\appdir\myfile.exe" )
|
||||
IF !( hb_FNameNameExt( ft_Origin() ) == "myapp.exe" )
|
||||
? "Incorrect startup file. Please remove/rename and start again"
|
||||
QUIT
|
||||
RETURN
|
||||
ENDIF
|
||||
$SEEALSO$
|
||||
$END$
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
SEGMENT directives, and also the ENDP and ENDS directives (a very
|
||||
minor task).
|
||||
$EXAMPLES$
|
||||
lOk := ft_outp( 0x64, 0 ) // send a hb_BChar( 0 ) to port 100 (0x64)
|
||||
? ft_outp( 0x64, 0 ) // send a hb_BChar( 0 ) to port 100 (0x64)
|
||||
$SEEALSO$
|
||||
ft_inp()
|
||||
$END$
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
ft_SetVpg()
|
||||
ft_SetVPg()
|
||||
$CATEGORY$
|
||||
Video
|
||||
$ONELINER$
|
||||
Set the current video page
|
||||
$SYNTAX$
|
||||
ft_SetVpg( <nPage> ) -> NIL
|
||||
ft_SetVPg( <nPage> ) -> NIL
|
||||
$ARGUMENTS$
|
||||
<nMode> is a valid video page.
|
||||
$RETURNS$
|
||||
@@ -20,7 +20,7 @@
|
||||
$EXAMPLES$
|
||||
// The following sets the current video page to 1
|
||||
|
||||
ft_SetVpg( 1 )
|
||||
ft_SetVPg( 1 )
|
||||
$SEEALSO$
|
||||
ft_GetVPg()
|
||||
$END$
|
||||
@@ -49,6 +49,6 @@
|
||||
$EXAMPLES$
|
||||
nPage := ft_GetVPg()
|
||||
$SEEALSO$
|
||||
ft_SetVpg()
|
||||
ft_SetVPg()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -21,6 +21,6 @@
|
||||
address as a numeric value. If you need this value as a character,
|
||||
use the hb_BChar() function to convert it.
|
||||
$EXAMPLES$
|
||||
LOCAL nVMode := ft_Peek( 0, 0x449 ) // Get the current video mode (MS-DOS)
|
||||
? ft_Peek( 0, 0x449 ) // Get the current video mode (MS-DOS)
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -14,6 +14,6 @@
|
||||
$DESCRIPTION$
|
||||
This function is ideal if you need the user to select a day.
|
||||
$EXAMPLES$
|
||||
mday := ft_PickDay()
|
||||
? ft_PickDay()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -34,37 +34,37 @@
|
||||
A couple of notes about the adder:
|
||||
|
||||
|
||||
1.) It was designed to be used on an Enhanced keyboard with
|
||||
separate <DELETE> key. <DELETE> is used to clear the adder.
|
||||
However, it will still work on a Standard keyboard.
|
||||
1. It was designed to be used on an Enhanced keyboard with
|
||||
separate <DELETE> key. <DELETE> is used to clear the adder.
|
||||
However, it will still work on a Standard keyboard.
|
||||
|
||||
2.) You do not have to display the tape. You may turn it on
|
||||
at any time by pressing <T>. You may SCROLL back through
|
||||
the tape once there are more than 16 entries in the
|
||||
adder, by pressing <S>.
|
||||
2. You do not have to display the tape. You may turn it on
|
||||
at any time by pressing <T>. You may SCROLL back through
|
||||
the tape once there are more than 16 entries in the
|
||||
adder, by pressing <S>.
|
||||
|
||||
3.) To Quit the Adder just press <ESC>. To return your Total
|
||||
to the application press <F10>. The adder will place the
|
||||
Total in the active GET variable using oGet:varPut(). The
|
||||
adder will only return a Total to a numerical GET!
|
||||
3. To Quit the Adder just press <ESC>. To return your Total
|
||||
to the application press <F10>. The adder will place the
|
||||
Total in the active GET variable using oGet:varPut(). The
|
||||
adder will only return a Total to a numerical GET!
|
||||
|
||||
4.) There are many support functions that you might find
|
||||
interesting. They are part of my personal library, but
|
||||
are necessary to the operation of the adder.
|
||||
You might want to pull these out to reduce the overall
|
||||
size of the adder. Many are worth at least a little
|
||||
time studying.
|
||||
4. There are many support functions that you might find
|
||||
interesting. They are part of my personal library, but
|
||||
are necessary to the operation of the adder.
|
||||
You might want to pull these out to reduce the overall
|
||||
size of the adder. Many are worth at least a little
|
||||
time studying.
|
||||
|
||||
5.) To make ft_Adder() a Hot key from inside your application
|
||||
at the beginning of your application add the line:
|
||||
5. To make ft_Adder() a Hot key from inside your application
|
||||
at the beginning of your application add the line:
|
||||
|
||||
SET KEY K_ALT_A TO ft_Adder()
|
||||
SetKey( K_ALT_A, {|| ft_Adder() } )
|
||||
|
||||
This will make <ALT-A> a key "Hot" and permit you to
|
||||
Pop - Up the adder from anywhere in the application.
|
||||
This will make <ALT-A> a key "Hot" and permit you to
|
||||
Pop - Up the adder from anywhere in the application.
|
||||
|
||||
6.) If you use ft_SInkey(), you can even have active hotkeys
|
||||
in an Inkey().
|
||||
6. If you use ft_SInkey(), you can even have active hotkeys
|
||||
in an Inkey().
|
||||
|
||||
$EXAMPLES$
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
and enhanced) by Robert DiFalco.
|
||||
$EXAMPLES$
|
||||
PROCEDURE Main( cStr )
|
||||
OutStd( ft_Proper( cStr ) + hb_eol() )
|
||||
? ft_Proper( cStr )
|
||||
RETURN
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
You can easily create a User-Defined Command that makes this function
|
||||
even more like the KEYBOARD command. For example,
|
||||
|
||||
#command KEYSTROKE <key> => ft_PutKey( <key> )
|
||||
#xcommand KEYSTROKE <key> => ft_PutKey( <key> )
|
||||
|
||||
will create a command called KEYSTROKE that could be used as a
|
||||
companion command to KEYBOARD. The only difference is that it would
|
||||
@@ -38,7 +38,7 @@
|
||||
and make any other necessary changes to the source code.
|
||||
$EXAMPLES$
|
||||
ft_PutKey( -9 ) // Stuff the F10 key
|
||||
ft_PutKey( 276 ) // Stuff the Alt T key
|
||||
KEYSTROKE 28 // Stuff the F1 key using a User-Defined Command
|
||||
ft_PutKey( 276 ) // Stuff the Alt+T key
|
||||
KEYBOARD 28 // Stuff the F1 key using a User-Defined Command
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -34,13 +34,13 @@
|
||||
to January 1 and Sunday by calling ft_DateCnfg() with no
|
||||
parameters.
|
||||
$EXAMPLES$
|
||||
// get info about quarter containing 9/15/90
|
||||
// get info about quarter containing 1990-09-15
|
||||
aDateInfo := ft_Qtr( hb_SToD( "19900915" ) )
|
||||
? aDateInfo[ 1 ] // 199003 (3rd quarter)
|
||||
? aDateInfo[ 2 ] // 1990-07-01 beginning of quarter 3
|
||||
? aDateInfo[ 3 ] // 1990-09-30 end of week quarter 3
|
||||
|
||||
// get info about quarter 2 in year containing 9/15/90
|
||||
// get info about quarter 2 in year containing 1990-09-15
|
||||
aDateInfo := ft_Qtr( hb_SToD( "19900915" ), 2 )
|
||||
? aDateInfo[ 1 ] // 199002
|
||||
? aDateInfo[ 2 ] // 1990-04-01 beginning of quarter 2
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
If you need a random number between 0 and <nMax> inclusive,
|
||||
then you should Round() the result.
|
||||
$EXAMPLES$
|
||||
nResult := Int( ft_Rand1( 100 ) ) + 1 // 1 <= nResult <= 100
|
||||
nResult := Round( ft_Rand1( 100 ), 0 ) // 0 <= nResult <= 100
|
||||
nResult := ft_Rand1( 1 ) // 0 <= nResult < 1
|
||||
? Int( ft_Rand1( 100 ) ) + 1 // 1 <= nResult <= 100
|
||||
? Round( ft_Rand1( 100 ), 0 ) // 0 <= nResult <= 100
|
||||
? ft_Rand1( 1 ) // 0 <= nResult < 1
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -28,6 +28,5 @@
|
||||
// Issue a warm boot
|
||||
|
||||
ft_Reboot( WARM )
|
||||
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
SEGMENT directives, and also the ENDP and ENDS directives (a very
|
||||
minor task).
|
||||
$EXAMPLES$
|
||||
ft_RmDir( "C:\clipper" )
|
||||
ft_RmDir( "\example" )
|
||||
ft_RmDir( "..\source" )
|
||||
? ft_RmDir( "harbour" )
|
||||
? ft_RmDir( hb_ps() + "example" )
|
||||
? ft_RmDir( ".." + hb_ps() + "source" )
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -45,18 +45,18 @@
|
||||
c. Amount (100's, 5 decimals, 16th, etc.)
|
||||
$EXAMPLES$
|
||||
// round normal to 2 decimal places
|
||||
nDollars := ft_Round( nDollars )
|
||||
? ft_Round( nDollars )
|
||||
|
||||
// round normal to 6 decimal places
|
||||
nIntRate := ft_Round( nIntRate, 6 )
|
||||
? ft_Round( nIntRate, 6 )
|
||||
|
||||
// round to nearest thousands
|
||||
nPrice := ft_Round( nPrice, 3, NEAREST_WHOLE_NUMBER )
|
||||
? ft_Round( nPrice, 3, NEAREST_WHOLE_NUMBER )
|
||||
|
||||
// round Up to nearest third
|
||||
nAmount := ft_Round( nAmount, 3, NEAREST_FRACTION, ROUND_UP )
|
||||
? ft_Round( nAmount, 3, NEAREST_FRACTION, ROUND_UP )
|
||||
|
||||
// round down to 3 decimals Within .005
|
||||
nAvg := ft_Round( nAvg, 3, , ROUND_DOWN, .005 )
|
||||
? ft_Round( nAvg, 3, , ROUND_DOWN, .005 )
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
array can be restored from the disc file using
|
||||
ft_RestArr().
|
||||
|
||||
[10/1/92 Librarian note:
|
||||
[1992-10-01 Librarian note:
|
||||
|
||||
This function does not appear to work with multi-dimensional
|
||||
arrays. If you'd care to modify it to support this feature,
|
||||
@@ -74,7 +74,7 @@
|
||||
ft_RestArr() restores an array which was saved to
|
||||
a disc file using ft_SaveArr().
|
||||
|
||||
[10/1/92 Librarian note:
|
||||
[1992-10-01 Librarian note:
|
||||
|
||||
This function does not appear to work with multi-dimensional
|
||||
arrays. If you'd care to modify it to support this feature,
|
||||
|
||||
@@ -32,15 +32,15 @@
|
||||
|
||||
* This was adapted from a short C routine posted by John Kaster on
|
||||
NANFORUM. It was written in Clipper to help demonstrate the
|
||||
FT_INT86 function of the Nanforum Toolkit.
|
||||
ft_int86() function of the Nanforum Toolkit.
|
||||
|
||||
This program requires ft_int86().
|
||||
$EXAMPLES$
|
||||
cKey := ft_ScanCode()
|
||||
? ft_ScanCode()
|
||||
|
||||
// <grey-> returns: hb_BChar( 45 ) + hb_BChar( 74 )
|
||||
// <-> returns: hb_BChar( 45 ) + hb_BChar( 12 )
|
||||
// <grey+> returns: hb_BChar( 43 ) + hb_BChar( 78 )
|
||||
// <+> returns: hb_BChar( 43 ) + hb_BChar( 13 )
|
||||
// <grey-> returns: hb_BChar( 45 ) + hb_BChar( 74 )
|
||||
// <-> returns: hb_BChar( 45 ) + hb_BChar( 12 )
|
||||
// <grey+> returns: hb_BChar( 43 ) + hb_BChar( 78 )
|
||||
// <+> returns: hb_BChar( 43 ) + hb_BChar( 13 )
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -24,15 +24,15 @@
|
||||
the DOS Set Date service (Interrupt 33, service 43).
|
||||
|
||||
$EXAMPLES$
|
||||
// The following program takes a date from the command line and sets
|
||||
// The following program takes a date from the command-line and sets
|
||||
// the DOS system date:
|
||||
|
||||
PROCEDURE Main( cDate )
|
||||
|
||||
cDate := iif( cDate == NIL, DToS( Date() ), cDate )
|
||||
? "Setting date to: " + cDate + "... "
|
||||
hb_default( @cDate, DToS( Date() ) )
|
||||
? "Setting date to:", cDate + "... "
|
||||
ft_SetDate( hb_SToD( cDate ) )
|
||||
? "Today is now: " + DToC( Date() )
|
||||
? "Today is now:", Date()
|
||||
|
||||
RETURN
|
||||
$END$
|
||||
|
||||
@@ -22,15 +22,15 @@
|
||||
the DOS Set Time service (Interrupt 33, service 45).
|
||||
|
||||
$EXAMPLES$
|
||||
// The following program takes a time string from the command line and sets
|
||||
// The following program takes a time string from the command-line and sets
|
||||
// the DOS system time:
|
||||
|
||||
PROCEDURE Main( cTime )
|
||||
|
||||
cTime := iif( cTime == NIL, Time(), cTime )
|
||||
? "Setting time to: " + cTime + "... "
|
||||
? "Setting time to:", cTime + "... "
|
||||
ft_SetTime( cTime )
|
||||
? "Time is now: " + Time()
|
||||
? "Time is now:", Time()
|
||||
|
||||
RETURN
|
||||
$END$
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
shift key is pressed, such as during a MemoEdit().
|
||||
$EXAMPLES$
|
||||
IF ft_Shift()
|
||||
@ 24, 0 SAY "Shift"
|
||||
@ 0, 0 SAY "Shift"
|
||||
ELSE
|
||||
@ 24, 0 SAY " "
|
||||
@ 0, 0 SAY " "
|
||||
ENDIF
|
||||
$SEEALSO$
|
||||
ft_CapLock() ft_Ctrl() ft_NumLock() ft_PrtScr() ft_Alt()
|
||||
|
||||
@@ -26,6 +26,6 @@
|
||||
respond to any keys set with SET KEY TO or SetKey().
|
||||
$EXAMPLES$
|
||||
SetKey( K_F1, {| n, l, r | HELP( n, l, r ) } )
|
||||
nKey := ft_SInkey( 0 ) // HELP() will be called if F1 pressed
|
||||
? ft_SInkey( 0 ) // HELP() will be called if F1 pressed
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_SLEEP
|
||||
ft_Sleep()
|
||||
$CATEGORY$
|
||||
Menus/Prompts
|
||||
$ONELINER$
|
||||
|
||||
@@ -14,15 +14,14 @@
|
||||
$RETURNS$
|
||||
cCompressed - Compressed string, 50% the size of nSize
|
||||
$DESCRIPTION$
|
||||
The FT_SQZN function allows a numeric value to be compressed when
|
||||
The ft_Sqzn() function allows a numeric value to be compressed when
|
||||
stored in the database. The compression is 50% the storage space
|
||||
of the original number. The companion function, FT_UNSQZN returns
|
||||
of the original number. The companion function, ft_Unsqzn() returns
|
||||
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 )
|
||||
TRANS->cust_id := ft_Sqzn( mcust_id, 8 )
|
||||
TRANS->amount := ft_Sqzn( mamount, 12, 2 )
|
||||
$SEEALSO$
|
||||
ft_Unsqzn()
|
||||
$INCLUDE$
|
||||
@@ -48,7 +47,7 @@
|
||||
$RETURNS$
|
||||
nValue - Uncompressed numeric value
|
||||
$DESCRIPTION$
|
||||
The FT_UNSQZN function returns the numeric value from the compressed
|
||||
The ft_Unsqzn() function returns the numeric value from the compressed
|
||||
string. The compression is 50% the storage space of the original
|
||||
number. The original number must have been compressed using the
|
||||
ft_Sqzn() function.
|
||||
@@ -57,8 +56,8 @@
|
||||
requirements for numeric fields in a database file.
|
||||
|
||||
$EXAMPLES$
|
||||
mcust_id := ft_Unsqzn( TRANS->cust_id, 8 )
|
||||
mamount := ft_Unsqzn( TRANS->amount, 12, 2 )
|
||||
? ft_Unsqzn( field->cust_id, 8 )
|
||||
? ft_Unsqzn( field->amount, 12, 2 )
|
||||
$SEEALSO$
|
||||
ft_Sqzn()
|
||||
$INCLUDE$
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
program without knowing what the current date type is. This
|
||||
function is the converse of the Clipper DToS() function.
|
||||
$EXAMPLES$
|
||||
LOCAL dMyDate
|
||||
dMyDate := ft_SToD( "19901127" )
|
||||
? ft_SToD( "19901127" )
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -10,16 +10,11 @@
|
||||
$ARGUMENTS$
|
||||
None
|
||||
$RETURNS$
|
||||
A numeric corresponding to the number of K memory.
|
||||
A numeric corresponding to the number of KiB memory.
|
||||
$DESCRIPTION$
|
||||
ft_SysMem() simply reports the amount of conventional memory
|
||||
(up to 640K) installed.
|
||||
|
||||
ft_SysMem() uses DOS interrupt 12h to get this information.
|
||||
For information, refer to Peter Norton's _Programmer's Guide
|
||||
to the IBM PC_ (Brady).
|
||||
|
||||
installed.
|
||||
$EXAMPLES$
|
||||
? "Conventional memory installed: " + Str( ft_SysMem() ) + "K"
|
||||
? "Conventional memory:", hb_ntos( ft_SysMem() ), "KiB installed"
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
<cColorList> is a list of colors for the TBrowse columns.
|
||||
The 1st color is used as SAY/TBrowse Background and the
|
||||
3rd and 4th colors are used as part of column:defColor := {3, 4}
|
||||
3rd and 4th colors are used as part of column:defColor := { 3, 4 }
|
||||
|
||||
Thus if you pass a cColorList, you MUST pass at least 4 colors.
|
||||
Defaults to "N/W, N/BG, B/W, B/BG, B/W, B/BG, R/W, B/R" if not passed.
|
||||
@@ -67,7 +67,7 @@
|
||||
LOCAL cColorList := "N/W, N/BG, B/W, B/BG, B/W, B/BG, R/W, B/R"
|
||||
LOCAL cColorShad := "N/N"
|
||||
|
||||
USE TBNames INDEX TBNames NEW // indexed on Last + First
|
||||
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()
|
||||
@@ -77,10 +77,9 @@
|
||||
|
||||
IF ft_BrwsWhl( aFields, bWhile, cKey, nFreeze, lSaveScrn, ;
|
||||
cColorList, cColorShad, 3, 6, MaxRow() - 2, MaxCol() - 6 ) == 0
|
||||
? "Sorry, NO Records Were Selected"
|
||||
? "Sorry, No records were selected"
|
||||
ELSE
|
||||
? "You Selected: " + TBNames->Last + " " + ;
|
||||
TBNames->First + " " + TBNames->City
|
||||
? "You Selected:", TBNames->Last, TBNames->First, TBNames->City
|
||||
ENDIF
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
attribute set. The default is .F.
|
||||
$RETURNS$
|
||||
<cFileSpec> should be your path, including the name of the newly
|
||||
created unique file. Use this with FOpen(), etc.
|
||||
created unique file. You are safe to create a new file with
|
||||
this filename.
|
||||
|
||||
If a DOS error occurred when trying to create the file, a
|
||||
null string will be returned.
|
||||
@@ -25,21 +26,17 @@
|
||||
This function uses DOS Interrupt 21, service 5Ah (Create temporary
|
||||
file) to create a unique filename in a directory you specify.
|
||||
There will be no extension. After the file is created, you may
|
||||
then FOpen() it and do any i/o you need (see the test driver
|
||||
in the source code).
|
||||
do any I/O you need (see the test driver in the source code).
|
||||
|
||||
This function requires ft_int86().
|
||||
$EXAMPLES$
|
||||
// Create a unique file in the root of the current drive:
|
||||
|
||||
myFile := ft_TempFil()
|
||||
? ft_TempFil()
|
||||
|
||||
// Create a unique file in the current directory and hide it:
|
||||
? ft_TempFil( ".", .T. )
|
||||
|
||||
myFile := ft_TempFil( "." + hb_ps(), .T. )
|
||||
|
||||
// Create a unique file on another drive, but do not hide it:
|
||||
|
||||
myFile := ft_TempFil( "E:\nanfor\src\" )
|
||||
// Create a unique file on another directory, but do not hide it:
|
||||
? ft_TempFil( "mytempdir" )
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -34,10 +34,10 @@
|
||||
main program. See the test code for a succinct demonstration.
|
||||
$EXAMPLES$
|
||||
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" } }
|
||||
{ "Data Entry", "Enter data", {|| ft_Menu2( datamenu ) } }, ;
|
||||
{ "Reports", "Hard copy", {|| ft_Menu2( repmenu ) } }, ;
|
||||
{ "Maintenance", "Reindex files", {|| ft_Menu2( maintmenu ) } }, ;
|
||||
{ "Quit", "See ya later" } }
|
||||
ft_Menu2( mainmenu )
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
ft_SetVcur()
|
||||
ft_SetVCur()
|
||||
$CATEGORY$
|
||||
Video
|
||||
$ONELINER$
|
||||
Set the cursor position on a specified video page
|
||||
$SYNTAX$
|
||||
ft_SetVcur( [ <nPage> ], [ <nRow> ], [ <nCol> ] ) -> NIL
|
||||
ft_SetVCur( [ <nPage> ], [ <nRow> ], [ <nCol> ] ) -> NIL
|
||||
$ARGUMENTS$
|
||||
<nPage> is the video page (defaults to current page, determined
|
||||
by ft_GetVPg()
|
||||
@@ -17,7 +17,7 @@
|
||||
$RETURNS$
|
||||
NIL
|
||||
$DESCRIPTION$
|
||||
ft_SetVcur() sets the cursor position on a specific video page.
|
||||
ft_SetVCur() sets the cursor position on a specific video page.
|
||||
It uses ft_int86() to invoke interrupt 10h, function 2.
|
||||
|
||||
For more information on graphics programming, cursors, and video
|
||||
@@ -27,7 +27,7 @@
|
||||
$EXAMPLES$
|
||||
// Set the position to row 5, column 10 on video page 1:
|
||||
|
||||
ft_SetVcur( 1, 5, 10 )
|
||||
ft_SetVCur( 1, 5, 10 )
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -66,6 +66,6 @@
|
||||
|
||||
$EXAMPLES$
|
||||
aCurInfo := getVCur( 1 ) // Get info on cursor pos in page 1
|
||||
? "Row: " + Str( aCurInfo[ 3 ] ) + " Col: " + Str( aCurInfo[ 4 ] )
|
||||
? "Row:", aCurInfo[ 3 ], " Col:", aCurInfo[ 4 ]
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
$EXAMPLES$
|
||||
PROCEDURE Main( cMode )
|
||||
ft_SetMode( Val( cMode ) )
|
||||
? "Video mode is: " + Str( ft_GetMode() )
|
||||
? "Video mode is:", ft_GetMode()
|
||||
RETURN
|
||||
$SEEALSO$
|
||||
ft_Adapter()
|
||||
@@ -49,7 +49,7 @@
|
||||
$EXAMPLES$
|
||||
PROCEDURE Main( cMode )
|
||||
ft_SetMode( Val( cMode ) )
|
||||
? "Video mode is: " + Str( ft_GetMode() )
|
||||
? "Video mode is:", ft_GetMode()
|
||||
RETURN
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
// Postdate 5 working days from the first of January
|
||||
dPost := hb_SToD( "19910101" )
|
||||
dPost += ft_AddWkDy( dPost, 5 ) // returns 7 true days
|
||||
? dPost // 1991-01-08
|
||||
? dPost // 1991-01-08
|
||||
$SEEALSO$
|
||||
ft_Workdays()
|
||||
$END$
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user