2012-11-15 19:10 UTC+0100 Viktor Szakats (harbour syenar.net)
* contrib/hbct/doc/en/*.txt
* contrib/hbgd/doc/en/hbgd.txt
* contrib/hbgt/doc/en/hbgt.txt
* contrib/hbmisc/doc/en/*.txt
* contrib/hbnf/doc/en/*.txt
* contrib/hbnf/tests/*.prg
* contrib/hbziparc/doc/en/hbziparc.txt
* contrib/rddads/doc/en/*.txt
* doc/en/*.txt
* extras/gtwvw/docs/*.txt
* synced casing of .prg level function names
with .hbx files, even if those are in docs,
comments or strings.
This commit is contained in:
@@ -16,6 +16,21 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2012-11-15 19:10 UTC+0100 Viktor Szakats (harbour syenar.net)
|
||||
* contrib/hbct/doc/en/*.txt
|
||||
* contrib/hbgd/doc/en/hbgd.txt
|
||||
* contrib/hbgt/doc/en/hbgt.txt
|
||||
* contrib/hbmisc/doc/en/*.txt
|
||||
* contrib/hbnf/doc/en/*.txt
|
||||
* contrib/hbnf/tests/*.prg
|
||||
* contrib/hbziparc/doc/en/hbziparc.txt
|
||||
* contrib/rddads/doc/en/*.txt
|
||||
* doc/en/*.txt
|
||||
* extras/gtwvw/docs/*.txt
|
||||
* synced casing of .prg level function names
|
||||
with .hbx files, even if those are in docs,
|
||||
comments or strings.
|
||||
|
||||
2012-11-15 18:57 UTC+0100 Viktor Szakats (harbour syenar.net)
|
||||
* doc/en/string.txt
|
||||
! fixed function name casing in recent commit in $EXAMPLES$ section
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
Default is .F., the original behaviour of this function.
|
||||
$RETURNS$
|
||||
The edited string is returned. The return value can be suppressed by
|
||||
using the CSETREF() function. The string must then be passed by
|
||||
using the CSetRef() function. The string must then be passed by
|
||||
reference [@].
|
||||
$DESCRIPTION$
|
||||
ADDASCII() can be used to add or subtract integer values from
|
||||
@@ -62,6 +62,6 @@
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CSETREF()
|
||||
CSetRef()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,38 +4,38 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
ASCIISUM()
|
||||
AsciiSum()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
calculate the sum of the ASCII values of the characters in a string
|
||||
$SYNTAX$
|
||||
ASCIISUM( <cString> ) --> nAsciiSum
|
||||
AsciiSum( <cString> ) --> nAsciiSum
|
||||
$ARGUMENTS$
|
||||
<cString> the string to be processed
|
||||
$RETURNS$
|
||||
<nAsciiSum> sum of the ASCII values in <cString>
|
||||
$DESCRIPTION$
|
||||
The ASCIISUM() function sums up the ASCII values of the characters
|
||||
The AsciiSum() function sums up the ASCII values of the characters
|
||||
in <cString>. Be aware that the function is not position sensitive,
|
||||
i.e. a change of position of a certain character in the string does
|
||||
not change the ascii sum.
|
||||
$EXAMPLES$
|
||||
? asciisum( "ABC" ) // --> 197
|
||||
? asciisum( "ACB" ) // --> 197
|
||||
? AsciiSum( "ABC" ) // --> 197
|
||||
? AsciiSum( "ACB" ) // --> 197
|
||||
$TESTS$
|
||||
asciisum( Replicate( "A", 10000 ) ) == 650000
|
||||
asciisum( "0123456789" ) == 525
|
||||
asciisum( NIL ) == 0
|
||||
AsciiSum( Replicate( "A", 10000 ) ) == 650000
|
||||
AsciiSum( "0123456789" ) == 525
|
||||
AsciiSum( NIL ) == 0
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
ASCIISUM() is compatible with CT3's ASCIISUM().
|
||||
AsciiSum() is compatible with CT3's AsciiSum().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CHECKSUM()
|
||||
Checksum()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
ASCPOS()
|
||||
AscPos()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
ASCII value of a character at a certain position
|
||||
$SYNTAX$
|
||||
ASCPOS( <cString>, [<nPosition>] ) --> nAsciiValue
|
||||
AscPos( <cString>, [<nPosition>] ) --> nAsciiValue
|
||||
$ARGUMENTS$
|
||||
<cString> is the processed string
|
||||
[<nPosition>] is an optional position within <cString>
|
||||
@@ -19,38 +19,38 @@
|
||||
<nAsciiValue> the ASCII value of the character at the specified
|
||||
position
|
||||
$DESCRIPTION$
|
||||
The ASCPOS() function returns the ASCII value of the character that
|
||||
The AscPos() function returns the ASCII value of the character that
|
||||
can be found at the position <nPosition> in <cString>. If <nPosition>
|
||||
is larger than the length of <cString>, 0 is returned.
|
||||
$EXAMPLES$
|
||||
? ascpos( "0123456789" ) // --> 57
|
||||
? ascpos( "0123456789", 1 ) // --> 48
|
||||
? AscPos( "0123456789" ) // --> 57
|
||||
? AscPos( "0123456789", 1 ) // --> 48
|
||||
$TESTS$
|
||||
ascpos( "0123456789" ) == 57
|
||||
ascpos( "0123456789", 1 ) == 48
|
||||
ascpos( "0123456789", 11 ) == 0 // <nPosition> to large !
|
||||
AscPos( "0123456789" ) == 57
|
||||
AscPos( "0123456789", 1 ) == 48
|
||||
AscPos( "0123456789", 11 ) == 0 // <nPosition> to large !
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
ASCPOS() is compatible with CT3's ASCPOS().
|
||||
AscPos() is compatible with CT3's AscPos().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
VALPOS()
|
||||
ValPos()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
VALPOS()
|
||||
ValPos()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Numerical value of a character at a certain position
|
||||
$SYNTAX$
|
||||
VALPOS( <cString>, [<nPosition>] ) --> nDigitValue
|
||||
ValPos( <cString>, [<nPosition>] ) --> nDigitValue
|
||||
$ARGUMENTS$
|
||||
<cString> is the processed string
|
||||
[<nPosition>] is an optional position within <cString>
|
||||
@@ -59,27 +59,27 @@
|
||||
<nDigitValue> the numerical value of the character at the specified
|
||||
position
|
||||
$DESCRIPTION$
|
||||
The VALPOS() function returns the numerical value of the character that
|
||||
The ValPos() function returns the numerical value of the character that
|
||||
can be found at the position <nPosition> in <cString>. If no digit
|
||||
can be found at this position or if <nPosition>
|
||||
is larger than the length of <cString>, 0 is returned.
|
||||
$EXAMPLES$
|
||||
? valpos( "1234x56789" ) // --> 9
|
||||
? valpos( "1234x56789", 1 ) // --> 1
|
||||
? ValPos( "1234x56789" ) // --> 9
|
||||
? ValPos( "1234x56789", 1 ) // --> 1
|
||||
$TESTS$
|
||||
valpos( "1234x56789" ) == 9
|
||||
valpos( "1234x56789", 1 ) == 1
|
||||
valpos( "1234x56789", 11 ) == 0 // <nPosition> to large !
|
||||
valpos( "1234x56789", 5 ) == 0 // "x" is not a digit !
|
||||
ValPos( "1234x56789" ) == 9
|
||||
ValPos( "1234x56789", 1 ) == 1
|
||||
ValPos( "1234x56789", 11 ) == 0 // <nPosition> to large !
|
||||
ValPos( "1234x56789", 5 ) == 0 // "x" is not a digit !
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
VALPOS() is compatible with CT3's VALPOS().
|
||||
ValPos() is compatible with CT3's ValPos().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
ASCPOS()
|
||||
AscPos()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
ATADJUST()
|
||||
AtAdjust()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Adjusts a sequence within a string to a specified position
|
||||
$SYNTAX$
|
||||
ATADJUST( <cStringToMatch>, <cString>, <nAdjustPosition>,
|
||||
AtAdjust( <cStringToMatch>, <cString>, <nAdjustPosition>,
|
||||
[<nCounter>], [<nIgnore>],
|
||||
[<nFillChar|cFillChar>] ) -> cString
|
||||
$ARGUMENTS$
|
||||
@@ -36,12 +36,12 @@
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
ATADJUST() works like CT3's ATADJUST()
|
||||
AtAdjust() works like CT3's AtAdjust()
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
SETATLIKE(),CSETATMUPA()
|
||||
SetAtLike(),CSetAtMupa()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
AFTERATNUM()
|
||||
AfterAtNum()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Returns string portion after nth occurence of substring
|
||||
$SYNTAX$
|
||||
AFTERATNUM( <cStringToMatch>, <cString>, [<nCounter>],
|
||||
AfterAtNum( <cStringToMatch>, <cString>, [<nCounter>],
|
||||
[<nIgnore>] ) --> cRestString
|
||||
$ARGUMENTS$
|
||||
<cStringToMatch> is the substring scanned for
|
||||
@@ -34,39 +34,39 @@
|
||||
matches or the last match is identical to the end of <cString>, an
|
||||
empty string will be returned.
|
||||
After a match has been found, the function continues to scan after
|
||||
that match if the CSETATMUPA() switch is turned off, with the
|
||||
that match if the CSetAtMupa() switch is turned off, with the
|
||||
second character of the matched substring otherwise.
|
||||
The function will also consider the settings of SETATLIKE().
|
||||
The function will also consider the settings of SetAtLike().
|
||||
$EXAMPLES$
|
||||
? AFTERATNUM( "!", "What is the answer ? 4 ! 5 !" ) // -> ""
|
||||
? AFTERATNUM( "!", "What is the answer ? 4 ! 5 ?" ) // -> " 5 ?"
|
||||
<TODO: add some examples here with csetatmupa() and setatlike()>
|
||||
? AfterAtNum( "!", "What is the answer ? 4 ! 5 !" ) // -> ""
|
||||
? AfterAtNum( "!", "What is the answer ? 4 ! 5 ?" ) // -> " 5 ?"
|
||||
<TODO: add some examples here with CSetAtMupa() and SetAtLike()>
|
||||
$TESTS$
|
||||
AFTERATNUM( "..", "..This..is..a..test!" ) == "test!"
|
||||
AFTERATNUM( "..", "..This..is..a..test!", 2 ) == "is..a..test!"
|
||||
AFTERATNUM( "..", "..This..is..a..test!", 2, 2 ) == "a..test!"
|
||||
AfterAtNum( "..", "..This..is..a..test!" ) == "test!"
|
||||
AfterAtNum( "..", "..This..is..a..test!", 2 ) == "is..a..test!"
|
||||
AfterAtNum( "..", "..This..is..a..test!", 2, 2 ) == "a..test!"
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
AFTERATNUM() is compatible with CT3's AFTERATNUM().
|
||||
AfterAtNum() is compatible with CT3's AfterAtNum().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
ATNUM(),BEFORATNUM(),CSETATMUPA(),SETATLIKE()
|
||||
AtNum(),BEFORAtNum(),CSetAtMupa(),SetAtLike()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
BEFORATNUM()
|
||||
BEFORAtNum()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Returns string portion before nth occurence of substring
|
||||
$SYNTAX$
|
||||
BEFORATNUM( <cStringToMatch>, <cString>, [<nCounter>],
|
||||
BEFORAtNum( <cStringToMatch>, <cString>, [<nCounter>],
|
||||
[<nIgnore>] ) --> cRestString
|
||||
$ARGUMENTS$
|
||||
<cStringToMatch> is the substring scanned for
|
||||
@@ -90,33 +90,33 @@
|
||||
matches or the last match is identical to the start of <cString>
|
||||
(i.e. the last match is the first match), an empty string will be returned.
|
||||
After a match has been found, the function continues to scan after
|
||||
that match if the CSETATMUPA() switch is turned off, with the
|
||||
that match if the CSetAtMupa() switch is turned off, with the
|
||||
second character of the matched substring otherwise.
|
||||
The function will also consider the settings of SETATLIKE().
|
||||
The function will also consider the settings of SetAtLike().
|
||||
$EXAMPLES$
|
||||
? BEFORATNUM( "!", "What is the answer ? 4 ! 5 !" ) // -> "What is the answer ? 4 ! 5 "
|
||||
? BEFORATNUM( "!", "What is the answer ? 4 ! 5 ?" ) // -> "What is the answer ? 4 "
|
||||
<TODO: add some examples here with csetatmupa() and setatlike()>
|
||||
? BEFORAtNum( "!", "What is the answer ? 4 ! 5 !" ) // -> "What is the answer ? 4 ! 5 "
|
||||
? BEFORAtNum( "!", "What is the answer ? 4 ! 5 ?" ) // -> "What is the answer ? 4 "
|
||||
<TODO: add some examples here with CSetAtMupa() and SetAtLike()>
|
||||
$TESTS$
|
||||
BEFORATNUM( "..", "..This..is..a..test!" ) == "..This..is..a"
|
||||
BEFORATNUM( "..", "..This..is..a..test!", 2 ) == "..This"
|
||||
BEFORATNUM( "..", "..This..is..a..test!", 2, 2 ) == "..This..is"
|
||||
BEFORAtNum( "..", "..This..is..a..test!" ) == "..This..is..a"
|
||||
BEFORAtNum( "..", "..This..is..a..test!", 2 ) == "..This"
|
||||
BEFORAtNum( "..", "..This..is..a..test!", 2, 2 ) == "..This..is"
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
BEFORATNUM() is compatible with CT3's BEFORATNUM().
|
||||
BEFORAtNum() is compatible with CT3's BEFORAtNum().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
ATNUM() AFTERATNUM() CSETATMUPA() SETATLIKE()
|
||||
AtNum() AfterAtNum() CSetAtMupa() SetAtLike()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
ATNUM()
|
||||
AtNum()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
@@ -145,26 +145,26 @@
|
||||
that match will be returned. If there aren't enough
|
||||
matches or there is no last match, 0 will be returned.
|
||||
After a match has been found, the function continues to scan after
|
||||
that match if the CSETATMUPA() switch is turned off, with the
|
||||
that match if the CSetAtMupa() switch is turned off, with the
|
||||
second character of the matched substring otherwise.
|
||||
The function will also consider the settings of SETATLIKE().
|
||||
The function will also consider the settings of SetAtLike().
|
||||
$EXAMPLES$
|
||||
? ATNUM( "!", "What is the answer ? 4 ! 5 !" ) // -> 28
|
||||
? ATNUM( "!", "What is the answer ? 4 ! 5 ?" ) // -> 24
|
||||
<TODO: add some examples here with csetatmupa() and setatlike()>
|
||||
? AtNum( "!", "What is the answer ? 4 ! 5 !" ) // -> 28
|
||||
? AtNum( "!", "What is the answer ? 4 ! 5 ?" ) // -> 24
|
||||
<TODO: add some examples here with CSetAtMupa() and SetAtLike()>
|
||||
$TESTS$
|
||||
ATNUM( "..", "..This..is..a..test!" ) == 14
|
||||
ATNUM( "..", "..This..is..a..test!", 2 ) == 7
|
||||
ATNUM( "..", "..This..is..a..test!", 2, 2 ) == 11
|
||||
AtNum( "..", "..This..is..a..test!" ) == 14
|
||||
AtNum( "..", "..This..is..a..test!", 2 ) == 7
|
||||
AtNum( "..", "..This..is..a..test!", 2, 2 ) == 11
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
ATNUM() is compatible with CT3's ATNUM().
|
||||
AtNum() is compatible with CT3's AtNum().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
ATNUM() AFTERATNUM() CSETATMUPA() SETATLIKE()
|
||||
AtNum() AfterAtNum() CSetAtMupa() SetAtLike()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
ATREPL()
|
||||
AtRepl()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Search and replace sequences in a string
|
||||
$SYNTAX$
|
||||
ATREPL( <cStringToMatch>, <cString>, <cReplacement>, [<nCounter>],
|
||||
AtRepl( <cStringToMatch>, <cString>, <cReplacement>, [<nCounter>],
|
||||
[<lMode>], [<nIgnore>] ) --> cString
|
||||
$ARGUMENTS$
|
||||
<cStringToMatch> is the substring searched for in <cString>
|
||||
@@ -28,7 +28,7 @@
|
||||
$RETURNS$
|
||||
<cString>
|
||||
$DESCRIPTION$
|
||||
The ATREPL() function searches and replaces sequences in a string.
|
||||
The AtRepl() function searches and replaces sequences in a string.
|
||||
First, the function ignores the first <nIgnore> characters of <cString>.
|
||||
Then, if <lMode> is set to .T., it searches for the <nCounter>th
|
||||
occurence of <cStringToMatch> in <cString>. If successful, the
|
||||
@@ -38,31 +38,31 @@
|
||||
be replaced with <cReplacement>. Note that, in this case,
|
||||
the replacements are performed even if the <nCounter>th occurence
|
||||
does not exist.
|
||||
By using the CSETATMUPA() switch you can decide whether the
|
||||
By using the CSetAtMupa() switch you can decide whether the
|
||||
function restarts searching after a found sequence of after
|
||||
the first character of that sequence.
|
||||
The function allows the use of wildcards in <cStringToMatch>
|
||||
and looks for the settings of SETATLIKE().
|
||||
and looks for the settings of SetAtLike().
|
||||
$EXAMPLES$
|
||||
? ATREPL( "ABC", "ABCDABCDABC", "xx" ) // --> "xxDxxDxx"
|
||||
? ATREPL( "ABC", "ABCDABC", "ZYXW" ) // --> "ZYXWDZYXW"
|
||||
? ATREPL( "ABC", "ABCDABCDABC", "xx", 2 ) // --> "xxDxxDABC"
|
||||
? ATREPL( "ABC", "ABCDABCDABC", "xx", 2, .T. ) // --> "ABCDxxDABC"
|
||||
? AtRepl( "ABC", "ABCDABCDABC", "xx" ) // --> "xxDxxDxx"
|
||||
? AtRepl( "ABC", "ABCDABC", "ZYXW" ) // --> "ZYXWDZYXW"
|
||||
? AtRepl( "ABC", "ABCDABCDABC", "xx", 2 ) // --> "xxDxxDABC"
|
||||
? AtRepl( "ABC", "ABCDABCDABC", "xx", 2, .T. ) // --> "ABCDxxDABC"
|
||||
$TESTS$
|
||||
ATREPL( "ABC", "ABCDABCDABC", "xx" ) == "xxDxxDxx"
|
||||
ATREPL( "ABC", "ABCDABC", "ZYXW" ) == "ZYXWDZYXW"
|
||||
ATREPL( "ABC", "ABCDABCDABC", "xx", 2 ) == "xxDxxDABC"
|
||||
ATREPL( "ABC", "ABCDABCDABC", "xx", 2, .T. ) == "ABCDxxDABC"
|
||||
AtRepl( "ABC", "ABCDABCDABC", "xx" ) == "xxDxxDxx"
|
||||
AtRepl( "ABC", "ABCDABC", "ZYXW" ) == "ZYXWDZYXW"
|
||||
AtRepl( "ABC", "ABCDABCDABC", "xx", 2 ) == "xxDxxDABC"
|
||||
AtRepl( "ABC", "ABCDABCDABC", "xx", 2, .T. ) == "ABCDxxDABC"
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
ATREPL() is compatible with CT3's ATREPL().
|
||||
AtRepl() is compatible with CT3's AtRepl().
|
||||
Note the new, 6th parameter !
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CSETATMUPA() SETATLIKE()
|
||||
CSetAtMupa() SetAtLike()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,71 +4,71 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CHAREVEN()
|
||||
CharEven()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Returns the characters on the even positions in a string
|
||||
$SYNTAX$
|
||||
CHAREVEN( <cString> ) --> cEvenString
|
||||
CharEven( <cString> ) --> cEvenString
|
||||
$ARGUMENTS$
|
||||
<cString> processed string
|
||||
$RETURNS$
|
||||
<cEvenString> a string containing all character from even positions
|
||||
in <cString>
|
||||
$DESCRIPTION$
|
||||
The CHAREVEN() function looks for the characters on the even positions
|
||||
The CharEven() function looks for the characters on the even positions
|
||||
in a given string, collects them and returns them as a string.
|
||||
$EXAMPLES$
|
||||
? CHAREVEN( " H E L L O !" ) // -> "HELLO!"
|
||||
? CharEven( " H E L L O !" ) // -> "HELLO!"
|
||||
$TESTS$
|
||||
CHAREVEN( " 1 2 3 4 5" ) == "12345"
|
||||
CHAREVEN( " 1 2 3 4 " ) == "1234"
|
||||
CHAREVEN( " " ) == ""
|
||||
CharEven( " 1 2 3 4 5" ) == "12345"
|
||||
CharEven( " 1 2 3 4 " ) == "1234"
|
||||
CharEven( " " ) == ""
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CHAREVEN() is compatible with CT3's CHAREVEN().
|
||||
CharEven() is compatible with CT3's CharEven().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CHARODD() CHARMIX()
|
||||
CharOdd() CharMix()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CHARODD()
|
||||
CharOdd()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Returns the characters on the odd positions in a string
|
||||
$SYNTAX$
|
||||
CHARODD( <cString> ) --> cOddString
|
||||
CharOdd( <cString> ) --> cOddString
|
||||
$ARGUMENTS$
|
||||
<cString> processed string
|
||||
$RETURNS$
|
||||
<cOddString> a string containing all character from odd positions
|
||||
in <cString>
|
||||
$DESCRIPTION$
|
||||
The CHARODD() function looks for the characters on the odd positions
|
||||
The CharOdd() function looks for the characters on the odd positions
|
||||
in a given string, collects them and returns them as a string.
|
||||
$EXAMPLES$
|
||||
? CHARODD( "H E L L O ! " ) // -> "HELLO!"
|
||||
? CharOdd( "H E L L O ! " ) // -> "HELLO!"
|
||||
$TESTS$
|
||||
CHARODD( "1A2B3C4D5E" ) == "12345"
|
||||
CHARODD( "1A2B3C4D5" ) == "12345"
|
||||
CharOdd( "1A2B3C4D5E" ) == "12345"
|
||||
CharOdd( "1A2B3C4D5" ) == "12345"
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CHARODD() is compatible with CT3's CHARODD().
|
||||
CharOdd() is compatible with CT3's CharOdd().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CHAREVEN() CHARMIX()
|
||||
CharEven() CharMix()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CHARSLIST()
|
||||
CharSList()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Generates a sorted list of all characters in a string
|
||||
$SYNTAX$
|
||||
CHARSLIST( [<cString>] ) -> cSortedCharacterList
|
||||
CharSList( [<cString>] ) -> cSortedCharacterList
|
||||
$ARGUMENTS$
|
||||
[<cString>] is the string for whom the function generates a
|
||||
sorted list of all characters
|
||||
@@ -18,38 +18,38 @@
|
||||
$RETURNS$
|
||||
<cSortedCharacterList> a sorted list of the characters in <cString>
|
||||
$DESCRIPTION$
|
||||
The CHARLIST() function generates a sorted list of those characters that
|
||||
The CharList() function generates a sorted list of those characters that
|
||||
are contained in <cString>. This list can contain each character
|
||||
only once, so that its maximum length is 256. The function
|
||||
gives the same result as CHARSORT(CHARLIST(<cString>))
|
||||
gives the same result as CharSort(CharList(<cString>))
|
||||
$EXAMPLES$
|
||||
? charslist( "Hello World !" ) // --> " !HWdelor"
|
||||
? CharSList( "Hello World !" ) // --> " !HWdelor"
|
||||
$TESTS$
|
||||
charslist( "Hello World !" ) == " !HWdelor"
|
||||
charslist( "Hello World !" ) == charsort( charlist( "Hello World !" ) )
|
||||
charslist( NIL ) == ""
|
||||
CharSList( "Hello World !" ) == " !HWdelor"
|
||||
CharSList( "Hello World !" ) == CharSort( CharList( "Hello World !" ) )
|
||||
CharSList( NIL ) == ""
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CHARSLIST() is only available in Harbour's CT3 library.
|
||||
CharSList() is only available in Harbour's CT3 library.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CHARNOLIST(),CHARLIST(),CHARHIST()
|
||||
CharNoList(),CharList(),CharHist()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CHARHIST()
|
||||
CharHist()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Generates a character histogram of a string
|
||||
$SYNTAX$
|
||||
CHARHIST( [<cString>] ) -> aCharacterCount
|
||||
CharHist( [<cString>] ) -> aCharacterCount
|
||||
$ARGUMENTS$
|
||||
[<cString>] is the string for whom the function generates a
|
||||
character histogram
|
||||
@@ -58,24 +58,24 @@
|
||||
<aCharacterCount> an array with 256 elements where the nth element
|
||||
contains the count of character #(n-1) in cString
|
||||
$DESCRIPTION$
|
||||
The CHARHIST() function generates a character histogram of those
|
||||
The CharHist() function generates a character histogram of those
|
||||
characters that are contained in <cString>. This histogram is stored
|
||||
in an 256-element array where the nth element contains the count
|
||||
of ASCII character #(n-1) in <cString>.
|
||||
$EXAMPLES$
|
||||
? charhist( "Hello World !" )[ 109 ] // --> 3 // Chr( 108 ) == "l"
|
||||
? CharHist( "Hello World !" )[ 109 ] // --> 3 // Chr( 108 ) == "l"
|
||||
$TESTS$
|
||||
charhist( "Hello World !" )[ 109 ] == 3
|
||||
Eval( {|| AEval( charhist( "Hello World !" ), {| x | nTotal += x } ), nTotal == Len( "Hello World !" ) }
|
||||
CharHist( "Hello World !" )[ 109 ] == 3
|
||||
Eval( {|| AEval( CharHist( "Hello World !" ), {| x | nTotal += x } ), nTotal == Len( "Hello World !" ) }
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CHARHIST() is only available in Harbour's CT3 library.
|
||||
CharHist() is only available in Harbour's CT3 library.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CHARLIST(),CHARNOLIST(),CHARSLIST()
|
||||
CharList(),CharNoList(),CharSList()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CHARLIST()
|
||||
CharList()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Generates a list of all characters in a string
|
||||
$SYNTAX$
|
||||
CHARLIST( [<cString>] ) -> cCharacterList
|
||||
CharList( [<cString>] ) -> cCharacterList
|
||||
$ARGUMENTS$
|
||||
[<cString>] is the string for whom the function generates a list
|
||||
of all characters
|
||||
@@ -18,37 +18,37 @@
|
||||
$RETURNS$
|
||||
<cCharacterList> a list of the characters in <cString>
|
||||
$DESCRIPTION$
|
||||
The CHARLIST() function generates a list of those characters that
|
||||
The CharList() function generates a list of those characters that
|
||||
are contained in <cString>. This list can contain each character
|
||||
only once, so that its maximum length is 256. The list lists those
|
||||
characters first that are occuring in <cString> first.
|
||||
$EXAMPLES$
|
||||
? charlist( "Hello World !" ) // --> "Helo Wrd!"
|
||||
? CharList( "Hello World !" ) // --> "Helo Wrd!"
|
||||
$TESTS$
|
||||
charlist( "Hello World !" ) == "Helo Wrd!"
|
||||
charlist( NIL ) == ""
|
||||
CharList( "Hello World !" ) == "Helo Wrd!"
|
||||
CharList( NIL ) == ""
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CHARLIST() is compatible with CT3's CHARLIST().
|
||||
CharList() is compatible with CT3's CharList().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CHARNOLIST(),CHARSLIST(),CHARHIST()
|
||||
CharNoList(),CharSList(),CharHist()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CHARNOLIST()
|
||||
CharNoList()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Generates a list of all characters not contained in a string
|
||||
$SYNTAX$
|
||||
CHARNOLIST( [<cString>] ) -> cCharacterList
|
||||
CharNoList( [<cString>] ) -> cCharacterList
|
||||
$ARGUMENTS$
|
||||
[<cString>] is the string for whom the function generates a list
|
||||
of all characters not contained in that string
|
||||
@@ -56,24 +56,24 @@
|
||||
$RETURNS$
|
||||
<cCharacterList> a list of the characters that are not contained in <cString>
|
||||
$DESCRIPTION$
|
||||
The CHARNOLIST() function generates a list of those characters that
|
||||
The CharNoList() function generates a list of those characters that
|
||||
are not contained in <cString>. This list can contain each character
|
||||
only once, so that its maximum length is 256. The list is alphabetically
|
||||
sorted.
|
||||
$EXAMPLES$
|
||||
? charnolist( charnolist( "Hello World !" ) ) // --> " !HWdelor"
|
||||
? CharNoList( CharNoList( "Hello World !" ) ) // --> " !HWdelor"
|
||||
$TESTS$
|
||||
charnolist( charnolist( "Hello World !" ) ) == charslist( "Hello World !" )
|
||||
charnolist( charnolist( NIL ) ) == ""
|
||||
CharNoList( CharNoList( "Hello World !" ) ) == CharSList( "Hello World !" )
|
||||
CharNoList( CharNoList( NIL ) ) == ""
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CHARNOLIST() is compatible with CT3's CHARNOLIST().
|
||||
CharNoList() is compatible with CT3's CharNoList().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CHARLIST(),CHARSLIST(),CHARHIST()
|
||||
CharList(),CharSList(),CharHist()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CHARMIRR()
|
||||
CharMirr()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Mirror a string
|
||||
$SYNTAX$
|
||||
CHARMIRR( <[@]cString>, [<lDontMirrorSpaces>] ) -> cMirroredString
|
||||
CharMirr( <[@]cString>, [<lDontMirrorSpaces>] ) -> cMirroredString
|
||||
$ARGUMENTS$
|
||||
<[@]cString> is the string that should be mirrored
|
||||
[<lDontMirrorSpaces>] if set to .T., spaces at the end of
|
||||
@@ -19,30 +19,30 @@
|
||||
$RETURNS$
|
||||
<cMirroredString> the mirrored string
|
||||
$DESCRIPTION$
|
||||
The CHARMIRR() function mirrors a string, i.e. the first character
|
||||
The CharMirr() function mirrors a string, i.e. the first character
|
||||
will be put at the end, the second at the last but one position etc..
|
||||
One can use this function for index searches, but then, the spaces
|
||||
at the end of the string should not be mirrored.
|
||||
One can omit the return value of the function by setting the CSETREF()
|
||||
One can omit the return value of the function by setting the CSetRef()
|
||||
switch to .T., but <cString> must then be passed by reference to get
|
||||
a result.
|
||||
$EXAMPLES$
|
||||
? charmirr( "racecar" ) // "racecar"
|
||||
? charmirr( "racecar ", .T. ) // "racecar "
|
||||
? charmirr( "racecar ", .F. ) // " racecar"
|
||||
? CharMirr( "racecar" ) // "racecar"
|
||||
? CharMirr( "racecar ", .T. ) // "racecar "
|
||||
? CharMirr( "racecar ", .F. ) // " racecar"
|
||||
$TESTS$
|
||||
charmirr( "racecar" ) == "racecar"
|
||||
charmirr( "racecar ", .T. ) == "racecar "
|
||||
charmirr( "racecar ", .F. ) == " racecar"
|
||||
CharMirr( "racecar" ) == "racecar"
|
||||
CharMirr( "racecar ", .T. ) == "racecar "
|
||||
CharMirr( "racecar ", .F. ) == " racecar"
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CHARMIRR() is compatible with CT3's CHARMIRR().
|
||||
CharMirr() is compatible with CT3's CharMirr().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CSETREF()
|
||||
CSetRef()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CHARMIX()
|
||||
CharMix()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Mix two strings
|
||||
$SYNTAX$
|
||||
CHARMIX( <cString1>[, <cString2>] ) --> cMixedString
|
||||
CharMix( <cString1>[, <cString2>] ) --> cMixedString
|
||||
$ARGUMENTS$
|
||||
<cString1> String that will be mixed with the characters from <cString2>
|
||||
[<cString2>] String whose characters will be mixed with the one from
|
||||
@@ -19,7 +19,7 @@
|
||||
$RETURNS$
|
||||
<cMixedString> Mixed string
|
||||
$DESCRIPTION$
|
||||
The CHARMIX() function mixes the strings <cString1> and <cString2>. To
|
||||
The CharMix() function mixes the strings <cString1> and <cString2>. To
|
||||
do this it takes one character after the other alternatively from
|
||||
<cString1> and <cString2> and puts them in the output string.
|
||||
This procedure is stopped when the end of <cString1> is reached. If
|
||||
@@ -27,28 +27,28 @@
|
||||
the begin of <cString2> again. If on the other hand <cString2> is
|
||||
longer than <cString1>, the surplus characters will be omitted.
|
||||
$EXAMPLES$
|
||||
? CHARMIX( "ABC", "123" ) // "A1B2C3"
|
||||
? CHARMIX( "ABCDE", "12" ) // "A1B2C1D2E1"
|
||||
? CHARMIX( "AB", "12345" ) // "A1B2"
|
||||
? CHARMIX( "HELLO", " " ) // "H E L L O "
|
||||
? CHARMIX( "HELLO", "" ) // "HELLO"
|
||||
? CharMix( "ABC", "123" ) // "A1B2C3"
|
||||
? CharMix( "ABCDE", "12" ) // "A1B2C1D2E1"
|
||||
? CharMix( "AB", "12345" ) // "A1B2"
|
||||
? CharMix( "HELLO", " " ) // "H E L L O "
|
||||
? CharMix( "HELLO", "" ) // "HELLO"
|
||||
$TESTS$
|
||||
CHARMIX( "ABC", "123" ) == "A1B2C3"
|
||||
CHARMIX( "ABCDE", "12" ) == "A1B2C1D2E1"
|
||||
CHARMIX( "AB", "12345" ) == "A1B2"
|
||||
CHARMIX( "HELLO", " " ) == "H E L L O "
|
||||
CHARMIX( "HELLO", "" ) == "HELLO"
|
||||
CharMix( "ABC", "123" ) == "A1B2C3"
|
||||
CharMix( "ABCDE", "12" ) == "A1B2C1D2E1"
|
||||
CharMix( "AB", "12345" ) == "A1B2"
|
||||
CharMix( "HELLO", " " ) == "H E L L O "
|
||||
CharMix( "HELLO", "" ) == "HELLO"
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CHARMIX() is compatible with CT3's CHARMIX().
|
||||
NOTE: CA-Tools version of CHARMIX() will hang
|
||||
CharMix() is compatible with CT3's CharMix().
|
||||
NOTE: CA-Tools version of CharMix() will hang
|
||||
if the second parameter is an empty string, this version will not.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CHAREVEN() CHARODD()
|
||||
CharEven() CharOdd()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CHARONE()
|
||||
CharOne()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Reduce multiple occurences of a character to one
|
||||
$SYNTAX$
|
||||
CHARONE( [<cCharactersToReduce>,] <cString> ) -> cReducedString
|
||||
CharOne( [<cCharactersToReduce>,] <cString> ) -> cReducedString
|
||||
$ARGUMENTS$
|
||||
[<cCharactersToReduce>] specifies the characters the multiple
|
||||
occurences of which should be reduced to one
|
||||
@@ -19,42 +19,42 @@
|
||||
$RETURNS$
|
||||
<cReducedString> the string with the reduced occurences
|
||||
$DESCRIPTION$
|
||||
The CHARONE() function reduces multiple occurences of characters in
|
||||
The CharOne() function reduces multiple occurences of characters in
|
||||
<cString> to a single one. It is important to note that the multiple
|
||||
occurences must occur directly one behind the other. This behaviour is
|
||||
is in contrast to the CHARLIST() function.
|
||||
is in contrast to the CharList() function.
|
||||
$EXAMPLES$
|
||||
? CHARONE( "122333a123" ) // "123a123"
|
||||
? CHARONE( "A B CCCD" ) // "A B CD"
|
||||
? CHARONE( " ", "A B A B" ) // "A B A B"
|
||||
? CHARONE( "o", "122oooB12o" ) // "122oB12o"
|
||||
? CharOne( "122333a123" ) // "123a123"
|
||||
? CharOne( "A B CCCD" ) // "A B CD"
|
||||
? CharOne( " ", "A B A B" ) // "A B A B"
|
||||
? CharOne( "o", "122oooB12o" ) // "122oB12o"
|
||||
$TESTS$
|
||||
CHARONE( "122333a123" ) == "123a123"
|
||||
CHARONE( "A B CCCD" ) == "A B CD"
|
||||
CHARONE( " ", "A B A B" ) == "A B A B"
|
||||
CHARONE( "o", "122oooB12o" ) == "122oB12o"
|
||||
CharOne( "122333a123" ) == "123a123"
|
||||
CharOne( "A B CCCD" ) == "A B CD"
|
||||
CharOne( " ", "A B A B" ) == "A B A B"
|
||||
CharOne( "o", "122oooB12o" ) == "122oB12o"
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CHARONE() is compatible with CT3's CHARONE().
|
||||
CharOne() is compatible with CT3's CharOne().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CHARREM() WORDONE()
|
||||
CharRem() WordOne()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
WORDONE()
|
||||
WordOne()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Reduce multiple occurences of a double character to one
|
||||
$SYNTAX$
|
||||
WORDONE( [<cDoubleCharactersToReduce>,] <cString> ) -> cReducedString
|
||||
WordOne( [<cDoubleCharactersToReduce>,] <cString> ) -> cReducedString
|
||||
$ARGUMENTS$
|
||||
[<cDoubleCharactersToReduce>] specifies the double characters the multiple
|
||||
occurences of which should be reduced to one
|
||||
@@ -63,26 +63,26 @@
|
||||
$RETURNS$
|
||||
<cReducedString> the string with the reduced occurences
|
||||
$DESCRIPTION$
|
||||
The WORDONE() function reduces multiple occurences of double characters in
|
||||
The WordOne() function reduces multiple occurences of double characters in
|
||||
<cString> to a single one. It is important to note that the multiple
|
||||
occurences must occur directly one behind the other.
|
||||
$EXAMPLES$
|
||||
? WORDONE( "12ABAB12" ) // "12AB12"
|
||||
? WORDONE( "1AAAA2" ) // "1AAAA2"
|
||||
? WORDONE( "12", "1212ABAB" ) // "12ABAB"
|
||||
? WordOne( "12ABAB12" ) // "12AB12"
|
||||
? WordOne( "1AAAA2" ) // "1AAAA2"
|
||||
? WordOne( "12", "1212ABAB" ) // "12ABAB"
|
||||
$TESTS$
|
||||
WORDONE( "12ABAB12" ) == "12AB12"
|
||||
WORDONE( "1AAAA2" ) == "1AAAA2"
|
||||
WORDONE( "12", "1212ABAB" ) == "12ABAB"
|
||||
WordOne( "12ABAB12" ) == "12AB12"
|
||||
WordOne( "1AAAA2" ) == "1AAAA2"
|
||||
WordOne( "12", "1212ABAB" ) == "12ABAB"
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
WORDONE() is compatible with CT3's WORDONE().
|
||||
WordOne() is compatible with CT3's WordOne().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CHARONE() CHARREM()
|
||||
CharOne() CharRem()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CHARONLY()
|
||||
CharOnly()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Intersectional set of two strings based on characters
|
||||
$SYNTAX$
|
||||
CHARONLY( <cThisCharactersOnly>, <cString> ) -> cReducedString
|
||||
CharOnly( <cThisCharactersOnly>, <cString> ) -> cReducedString
|
||||
$ARGUMENTS$
|
||||
<cThisCharactersOnly> specifies the characters that must not be
|
||||
deleted in <cString>.
|
||||
@@ -19,37 +19,37 @@
|
||||
<cReducedString> A string with all characters deleted but those
|
||||
specified in <cThisCharactersOnly>.
|
||||
$DESCRIPTION$
|
||||
The CHARONLY() function calculates the intersectional set of two
|
||||
The CharOnly() function calculates the intersectional set of two
|
||||
strings. To do this, it deletes all characters from <cString> that
|
||||
do not appear in <cThisCharacterOnly>.
|
||||
$EXAMPLES$
|
||||
? CHARONLY( "0123456789", "0211 - 38 99 77" ) // "0211389977"
|
||||
? CHARONLY( "0123456789", "0211/ 389 977" ) // "0211389977"
|
||||
? CharOnly( "0123456789", "0211 - 38 99 77" ) // "0211389977"
|
||||
? CharOnly( "0123456789", "0211/ 389 977" ) // "0211389977"
|
||||
$TESTS$
|
||||
CHARONLY( "0123456789", "0211 - 38 99 77" ) == "0211389977"
|
||||
CHARONLY( "0123456789", "0211/ 389 977" ) == "0211389977"
|
||||
CharOnly( "0123456789", "0211 - 38 99 77" ) == "0211389977"
|
||||
CharOnly( "0123456789", "0211/ 389 977" ) == "0211389977"
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CHARONLY() is compatible with CT3's CHARONLY().
|
||||
CharOnly() is compatible with CT3's CharOnly().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CHARREM() WORDONLY() WORDREM()
|
||||
CharRem() WordOnly() WordRem()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
WORDONLY()
|
||||
WordOnly()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Intersectional set of two strings based on double characters
|
||||
$SYNTAX$
|
||||
WORDONLY( <cThisDoubleCharactersOnly>, <cString> ) -> cReducedString
|
||||
WordOnly( <cThisDoubleCharactersOnly>, <cString> ) -> cReducedString
|
||||
$ARGUMENTS$
|
||||
<cThisDoubleCharactersOnly> specifies the double characters that must
|
||||
not be deleted in <cString>.
|
||||
@@ -58,37 +58,37 @@
|
||||
<cReducedString> A string with all double characters deleted
|
||||
but those specified in <cThisCharactersOnly>.
|
||||
$DESCRIPTION$
|
||||
The WORDONLY() function calculates the intersectional set of two
|
||||
The WordOnly() function calculates the intersectional set of two
|
||||
strings based on double characters. To do this, it deletes all double
|
||||
characters from <cString> that do not appear in <cThisDoubleCharacterOnly>.
|
||||
$EXAMPLES$
|
||||
? WORDONLY( "AABBCCDD", "XXAAYYBBZZ" ) // "AABB"
|
||||
? WORDONLY( "AABBCCDD", "XAAYYYBBZZ" ) // "BB"
|
||||
? WordOnly( "AABBCCDD", "XXAAYYBBZZ" ) // "AABB"
|
||||
? WordOnly( "AABBCCDD", "XAAYYYBBZZ" ) // "BB"
|
||||
$TESTS$
|
||||
WORDONLY( "AABBCCDD", "XXAAYYBBZZ" ) == "AABB"
|
||||
WORDONLY( "AABBCCDD", "XAAYYYBBZZ" ) == "BB"
|
||||
WordOnly( "AABBCCDD", "XXAAYYBBZZ" ) == "AABB"
|
||||
WordOnly( "AABBCCDD", "XAAYYYBBZZ" ) == "BB"
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
WORDONLY() is compatible with CT3's WORDONLY().
|
||||
WordOnly() is compatible with CT3's WordOnly().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CHARONLY() CHARREM() WORDREM()
|
||||
CharOnly() CharRem() WordRem()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CHARREM()
|
||||
CharRem()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Removes characters from a string
|
||||
$SYNTAX$
|
||||
CHARREM( <cDeleteThisCharacters>, <cString> ) -> cReducedString
|
||||
CharRem( <cDeleteThisCharacters>, <cString> ) -> cReducedString
|
||||
$ARGUMENTS$
|
||||
<cDeleteThisCharacters> specifies the characters that should
|
||||
be deleted in <cString>
|
||||
@@ -97,36 +97,36 @@
|
||||
<cReducedString> is a string where the characters specified
|
||||
in <cDeleteThisCharacters> are deleted
|
||||
$DESCRIPTION$
|
||||
The CHARREM() function deletes the characters specified in
|
||||
The CharRem() function deletes the characters specified in
|
||||
<cDeleteThisCharacters> from <cString>.
|
||||
$EXAMPLES$
|
||||
? CHARREM( " ", " 1 2 " ) // "12"
|
||||
? CHARREM( "3y", "xyz123" ) // "xz12"
|
||||
? CharRem( " ", " 1 2 " ) // "12"
|
||||
? CharRem( "3y", "xyz123" ) // "xz12"
|
||||
$TESTS$
|
||||
CHARREM( " ", " 1 2 " ) == "12"
|
||||
CHARREM( "3y", "xyz123" ) == "xz12"
|
||||
CharRem( " ", " 1 2 " ) == "12"
|
||||
CharRem( "3y", "xyz123" ) == "xz12"
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CHARREM() is compatible with CT3's CHARREM().
|
||||
CharRem() is compatible with CT3's CharRem().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CHARONLY() WORDONLY() WORDREM()
|
||||
CharOnly() WordOnly() WordRem()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
WORDREM()
|
||||
WordRem()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Removes characters from a string
|
||||
$SYNTAX$
|
||||
WORDREM( <cDeleteThisDoubleCharacters>, <cString> ) -> cReducedString
|
||||
WordRem( <cDeleteThisDoubleCharacters>, <cString> ) -> cReducedString
|
||||
$ARGUMENTS$
|
||||
<cDeleteThisDoubleCharacters> specifies the double characters that
|
||||
should be deleted in <cString>
|
||||
@@ -136,23 +136,23 @@
|
||||
specified in <cDeleteThisDoubleCharacters>
|
||||
are deleted
|
||||
$DESCRIPTION$
|
||||
The WORDREM() function deletes the double characters specified in
|
||||
The WordRem() function deletes the double characters specified in
|
||||
<cDeleteThisDoubleCharacters> from <cString>.
|
||||
$EXAMPLES$
|
||||
? WORDREM( "abcd", "0ab1cd" ) // "0ab1"
|
||||
? WORDREM( "abcd", "ab0cd1" ) // "0cd1"
|
||||
? WordRem( "abcd", "0ab1cd" ) // "0ab1"
|
||||
? WordRem( "abcd", "ab0cd1" ) // "0cd1"
|
||||
$TESTS$
|
||||
WORDREM( "abcd", "0ab1cd" ) == "0ab1"
|
||||
WORDREM( "abcd", "ab0cd1" ) == "0cd1"
|
||||
WordRem( "abcd", "0ab1cd" ) == "0ab1"
|
||||
WordRem( "abcd", "ab0cd1" ) == "0cd1"
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
WORDREM() is a new function available only in Harbour's CT3.
|
||||
WordRem() is a new function available only in Harbour's CT3.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CHARONLY CHARREM() WORDREM()
|
||||
CHARONLY CharRem() WordRem()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,240 +4,240 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CHARADD()
|
||||
CharAdd()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Adds corresponding ASCII value of two strings
|
||||
$SYNTAX$
|
||||
CHARADD( <[@]cString1>, <cString2> ) --> cAddString
|
||||
CharAdd( <[@]cString1>, <cString2> ) --> cAddString
|
||||
$ARGUMENTS$
|
||||
<[@]cString1> first string
|
||||
<cString2> second string
|
||||
$RETURNS$
|
||||
<cAddString> string with added ASCII values
|
||||
$DESCRIPTION$
|
||||
The CHARADD() function constructs a new string from the two strings
|
||||
The CharAdd() function constructs a new string from the two strings
|
||||
passed as parameters. To do this, it adds the ASCII values of the
|
||||
corresponding characters of both strings and places a character in
|
||||
the resulting string whose ASCII value equals to that sum (modulo 256).
|
||||
If the first string is passed by reference, the resulting string is
|
||||
stored in <cString1>, too. By setting the CSETREF()-switch to .T.,
|
||||
stored in <cString1>, too. By setting the CSetRef()-switch to .T.,
|
||||
the return value can be omitted.
|
||||
If <cString2> is shorter than <cString1> and the last character of
|
||||
<cString2> has been processed, the function restarts with the first
|
||||
character of <cString2>.
|
||||
$EXAMPLES$
|
||||
? charadd( "012345678", Chr( 1 ) ) // --> "123456789"
|
||||
? charadd( "123456789", Chr( 255 ) ) // --> "012345678"
|
||||
? charadd( "0000", Chr( 0 ) + Chr( 1 ) + Chr( 2 ) + Chr( 3 ) ) // --> "0123"
|
||||
? CharAdd( "012345678", Chr( 1 ) ) // --> "123456789"
|
||||
? CharAdd( "123456789", Chr( 255 ) ) // --> "012345678"
|
||||
? CharAdd( "0000", Chr( 0 ) + Chr( 1 ) + Chr( 2 ) + Chr( 3 ) ) // --> "0123"
|
||||
$TESTS$
|
||||
charadd( "012345678", Chr( 1 ) ) == "123456789"
|
||||
charadd( "012345678", Chr( 1 ) + Chr( 2 ) ) == "133557799"
|
||||
charadd( "123456789", Chr( 255 ) ) == "012345678"
|
||||
charadd( "123456789", Chr( 255 ) + Chr( 254 ) ) == "002244668"
|
||||
CharAdd( "012345678", Chr( 1 ) ) == "123456789"
|
||||
CharAdd( "012345678", Chr( 1 ) + Chr( 2 ) ) == "133557799"
|
||||
CharAdd( "123456789", Chr( 255 ) ) == "012345678"
|
||||
CharAdd( "123456789", Chr( 255 ) + Chr( 254 ) ) == "002244668"
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CHARADD() is compatible with CT3's CHARADD().
|
||||
CharAdd() is compatible with CT3's CharAdd().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CHARSUB() CHARAND() CHARNOT()
|
||||
CHAROR() CHARXOR() CHARSHL()
|
||||
CHARSHR() CHARRLL() CHARRLR()
|
||||
CSETREF()
|
||||
CharSub() CharAnd() CharNot()
|
||||
CharOr() CharXor() CharShl()
|
||||
CharShr() CharRll() CharRlr()
|
||||
CSetRef()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CHARAND()
|
||||
CharAnd()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Combine corresponding ASCII value of two strings with bitwise AND
|
||||
$SYNTAX$
|
||||
CHARAND( <[@]cString1>, <cString2> ) --> cAndString
|
||||
CharAnd( <[@]cString1>, <cString2> ) --> cAndString
|
||||
$ARGUMENTS$
|
||||
<[@]cString1> first string
|
||||
<cString2> second string
|
||||
$RETURNS$
|
||||
<cAndString> string with bitwise AND combined ASCII values
|
||||
$DESCRIPTION$
|
||||
The CHARAND() function constructs a new string from the two strings
|
||||
The CharAnd() function constructs a new string from the two strings
|
||||
passed as parameters. To do this, it combines the ASCII values of the
|
||||
corresponding characters of both strings with a bitwise AND-operation
|
||||
and places a character in the resulting string whose ASCII value
|
||||
equals to the result of that operation.
|
||||
If the first string is passed by reference, the resulting string is
|
||||
stored in <cString1>, too. By setting the CSETREF()-switch to .T.,
|
||||
stored in <cString1>, too. By setting the CSetRef()-switch to .T.,
|
||||
the return value can be omitted.
|
||||
If <cString2> is shorter than <cString1> and the last character of
|
||||
<cString2> has been processed, the function restarts with the first
|
||||
character of <cString2>.
|
||||
$EXAMPLES$
|
||||
// clear the LSB
|
||||
? charand( "012345678", Chr( 254 ) ) // --> "002244668"
|
||||
? charand( "012345678", Chr( 254 ) + Chr( 252 ) ) // --> "002044648"
|
||||
? CharAnd( "012345678", Chr( 254 ) ) // --> "002244668"
|
||||
? CharAnd( "012345678", Chr( 254 ) + Chr( 252 ) ) // --> "002044648"
|
||||
$TESTS$
|
||||
charand( "012345678", Chr( 254 ) ) == "002244668"
|
||||
charand( "012345678", Chr( 254 ) + Chr( 252 ) ) == "002044648"
|
||||
CharAnd( "012345678", Chr( 254 ) ) == "002244668"
|
||||
CharAnd( "012345678", Chr( 254 ) + Chr( 252 ) ) == "002044648"
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CHARAND() is compatible with CT3's CHARAND().
|
||||
CharAnd() is compatible with CT3's CharAnd().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CHARADD() CHARSUB() CHARNOT()
|
||||
CHAROR() CHARXOR() CHARSHL()
|
||||
CHARSHR() CHARRLL() CHARRLR()
|
||||
CSETREF()
|
||||
CharAdd() CharSub() CharNot()
|
||||
CharOr() CharXor() CharShl()
|
||||
CharShr() CharRll() CharRlr()
|
||||
CSetRef()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CHARNOT()
|
||||
CharNot()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Process each character in a string with bitwise NOT operation
|
||||
$SYNTAX$
|
||||
CHARNOT( <[@]cString> ) --> cNotString
|
||||
CharNot( <[@]cString> ) --> cNotString
|
||||
$ARGUMENTS$
|
||||
<[@]cString> string to be processed
|
||||
$RETURNS$
|
||||
<cNotString> string with bitwise negated characters
|
||||
$DESCRIPTION$
|
||||
The CHARNOT() function constructs a new string from the string
|
||||
The CharNot() function constructs a new string from the string
|
||||
passed as parameter. To do this, it performs a bitwise NOT operation
|
||||
to the characters of the string and places a character in
|
||||
the resulting string whose ASCII value equals to the result of that
|
||||
operation. It can be easily seen that the resulting ASCII-value equals
|
||||
255 minus input ASCII value.
|
||||
If the string is passed by reference, the resulting string is
|
||||
stored in <cString>, too. By setting the CSETREF()-switch to .T.,
|
||||
stored in <cString>, too. By setting the CSetRef()-switch to .T.,
|
||||
the return value can be omitted.
|
||||
$EXAMPLES$
|
||||
? charnot( Chr( 85 ) + Chr( 128 ) + Chr( 170 ) + Chr( 1 ) ) // --> Chr( 170 ) + Chr( 127 ) + Chr( 85 ) + Chr( 254 )
|
||||
? charnot( charnot( "This is a test!" ) ) // --> "This is a test!"
|
||||
? CharNot( Chr( 85 ) + Chr( 128 ) + Chr( 170 ) + Chr( 1 ) ) // --> Chr( 170 ) + Chr( 127 ) + Chr( 85 ) + Chr( 254 )
|
||||
? CharNot( CharNot( "This is a test!" ) ) // --> "This is a test!"
|
||||
$TESTS$
|
||||
charnot( Chr( 85 ) + Chr( 128 ) + Chr( 170 ) + Chr( 1 ) ) == Chr( 170 ) + Chr( 127 ) + Chr( 85 ) + Chr( 254 )
|
||||
charnot( charnot( "This is a test!" ) ) == "This is a test!"
|
||||
CharNot( Chr( 85 ) + Chr( 128 ) + Chr( 170 ) + Chr( 1 ) ) == Chr( 170 ) + Chr( 127 ) + Chr( 85 ) + Chr( 254 )
|
||||
CharNot( CharNot( "This is a test!" ) ) == "This is a test!"
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CHARNOT() is compatible with CT3's CHARNOT().
|
||||
CharNot() is compatible with CT3's CharNot().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CHARADD() CHARSUB() CHARAND()
|
||||
CHAROR() CHARXOR() CHARSHL()
|
||||
CHARSHR() CHARRLL() CHARRLR()
|
||||
CSETREF()
|
||||
CharAdd() CharSub() CharAnd()
|
||||
CharOr() CharXor() CharShl()
|
||||
CharShr() CharRll() CharRlr()
|
||||
CSetRef()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CHAROR()
|
||||
CharOr()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Combine corresponding ASCII value of two strings with bitwise OR
|
||||
$SYNTAX$
|
||||
CHAROR( <[@]cString1>, <cString2> ) --> cOrString
|
||||
CharOr( <[@]cString1>, <cString2> ) --> cOrString
|
||||
$ARGUMENTS$
|
||||
<[@]cString1> first string
|
||||
<cString2> second string
|
||||
$RETURNS$
|
||||
<cOrString> string with bitwise OR combined ASCII values
|
||||
$DESCRIPTION$
|
||||
The CHAROR() function constructs a new string from the two strings
|
||||
The CharOr() function constructs a new string from the two strings
|
||||
passed as parameters. To do this, it combines the ASCII values of the
|
||||
corresponding characters of both strings with a bitwise OR-operation
|
||||
and places a character in the resulting string whose ASCII value
|
||||
equals to the result of that operation.
|
||||
If the first string is passed by reference, the resulting string is
|
||||
stored in <cString1>, too. By setting the CSETREF()-switch to .T.,
|
||||
stored in <cString1>, too. By setting the CSetRef()-switch to .T.,
|
||||
the return value can be omitted.
|
||||
If <cString2> is shorter than <cString1> and the last character of
|
||||
<cString2> has been processed, the function restarts with the first
|
||||
character of <cString2>.
|
||||
$EXAMPLES$
|
||||
// set the LSB
|
||||
? charor( "012345678", Chr( 1 ) ) // --> "113355779"
|
||||
? charor( "012345678", Chr( 1 ) + Chr( 3 ) ) // --> "133357779"
|
||||
? CharOr( "012345678", Chr( 1 ) ) // --> "113355779"
|
||||
? CharOr( "012345678", Chr( 1 ) + Chr( 3 ) ) // --> "133357779"
|
||||
$TESTS$
|
||||
charor( "012345678", Chr( 1 ) ) == "113355779"
|
||||
charor( "012345678", Chr( 1 ) + Chr( 3 ) ) == "133357779"
|
||||
CharOr( "012345678", Chr( 1 ) ) == "113355779"
|
||||
CharOr( "012345678", Chr( 1 ) + Chr( 3 ) ) == "133357779"
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CHAROR() is compatible with CT3's CHAROR().
|
||||
CharOr() is compatible with CT3's CharOr().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CHARADD() CHARSUB() CHARNOT()
|
||||
CHARAND() CHARXOR() CHARSHL()
|
||||
CHARSHR() CHARRLL() CHARRLR()
|
||||
CSETREF()
|
||||
CharAdd() CharSub() CharNot()
|
||||
CharAnd() CharXor() CharShl()
|
||||
CharShr() CharRll() CharRlr()
|
||||
CSetRef()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CHARXOR()
|
||||
CharXor()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Combine corresponding ASCII value of two strings with bitwise XOR
|
||||
$SYNTAX$
|
||||
CHARXOR( <[@]cString1>, <cString2> ) --> cXOrString
|
||||
CharXor( <[@]cString1>, <cString2> ) --> cXOrString
|
||||
$ARGUMENTS$
|
||||
<[@]cString1> first string
|
||||
<cString2> second string
|
||||
$RETURNS$
|
||||
<cXOrString> string with bitwise XOR combined ASCII values
|
||||
$DESCRIPTION$
|
||||
The CHARXOR() function constructs a new string from the two strings
|
||||
The CharXor() function constructs a new string from the two strings
|
||||
passed as parameters. To do this, it combines the ASCII values of the
|
||||
corresponding characters of both strings with a bitwise XOR-operation
|
||||
and places a character in the resulting string whose ASCII value
|
||||
equals to the result of that operation.
|
||||
If the first string is passed by reference, the resulting string is
|
||||
stored in <cString1>, too. By setting the CSETREF()-switch to .T.,
|
||||
stored in <cString1>, too. By setting the CSetRef()-switch to .T.,
|
||||
the return value can be omitted.
|
||||
If <cString2> is shorter than <cString1> and the last character of
|
||||
<cString2> has been processed, the function restarts with the first
|
||||
character of <cString2>.
|
||||
$EXAMPLES$
|
||||
// easy encryption
|
||||
? charxor( "This is top secret !", "My Password" ) // --> <encrypted sentence>
|
||||
? CharXor( "This is top secret !", "My Password" ) // --> <encrypted sentence>
|
||||
$TESTS$
|
||||
charxor( charxor( "This is top secret !", "My Password" ), "My Password" ) == "This is top secret !"
|
||||
CharXor( CharXor( "This is top secret !", "My Password" ), "My Password" ) == "This is top secret !"
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CHARXOR() is compatible with CT3's CHARXOR().
|
||||
CharXor() is compatible with CT3's CharXor().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CHARADD() CHARSUB() CHARNOT()
|
||||
CHARAND() CHAROR() CHARSHL()
|
||||
CHARSHR() CHARRLL() CHARRLR()
|
||||
CSETREF()
|
||||
CharAdd() CharSub() CharNot()
|
||||
CharAnd() CharOr() CharShl()
|
||||
CharShr() CharRll() CharRlr()
|
||||
CSetRef()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,236 +4,236 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CHARSUB()
|
||||
CharSub()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Subtracts corresponding ASCII value of two strings
|
||||
$SYNTAX$
|
||||
CHARSUB( <[@]cString1>, <cString2>) --> cSubString
|
||||
CharSub( <[@]cString1>, <cString2>) --> cSubString
|
||||
$ARGUMENTS$
|
||||
<[@]cString1> first string
|
||||
<cString2> second string
|
||||
$RETURNS$
|
||||
<cSubString> string with subtracted ASCII values
|
||||
$DESCRIPTION$
|
||||
The CHARSUB() function constructs a new string from the two strings
|
||||
The CharSub() function constructs a new string from the two strings
|
||||
passed as parameters. To do this, it subtracts the ASCII values of the
|
||||
corresponding characters of both strings and places a character in
|
||||
the resulting string whose ASCII value equals to that difference (modulo 256).
|
||||
If the first string is passed by reference, the resulting string is
|
||||
stored in <cString1>, too. By setting the CSETREF()-switch to .T.,
|
||||
stored in <cString1>, too. By setting the CSetRef()-switch to .T.,
|
||||
the return value can be omitted.
|
||||
If <cString2> is shorter than <cString1> and the last character of
|
||||
<cString2> has been processed, the function restarts with the first
|
||||
character of <cString2>.
|
||||
$EXAMPLES$
|
||||
? charsub( "012345678", Chr( 1 ) ) // --> "/01234567"
|
||||
? charsub( "123456789", Chr( 255 ) ) // --> "23456789:"
|
||||
? charsub( "9999", Chr( 0 ) + Chr( 1 ) + Chr( 2 ) + Chr( 3 ) ) // --> "9876"
|
||||
? CharSub( "012345678", Chr( 1 ) ) // --> "/01234567"
|
||||
? CharSub( "123456789", Chr( 255 ) ) // --> "23456789:"
|
||||
? CharSub( "9999", Chr( 0 ) + Chr( 1 ) + Chr( 2 ) + Chr( 3 ) ) // --> "9876"
|
||||
$TESTS$
|
||||
charsub( "123456789", Chr( 1 ) ) == "012345678"
|
||||
charsub( "123456789", Chr( 1 ) + Chr( 2 ) ) == "002244668"
|
||||
charsub( "012345678", Chr( 255 ) ) == "123456789"
|
||||
charsub( "012345678", Chr( 255 ) + Chr( 254 ) ) == "133557799"
|
||||
CharSub( "123456789", Chr( 1 ) ) == "012345678"
|
||||
CharSub( "123456789", Chr( 1 ) + Chr( 2 ) ) == "002244668"
|
||||
CharSub( "012345678", Chr( 255 ) ) == "123456789"
|
||||
CharSub( "012345678", Chr( 255 ) + Chr( 254 ) ) == "133557799"
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CHARSUB() is a new function that is only available in Harbour's CT3 lib.
|
||||
CharSub() is a new function that is only available in Harbour's CT3 lib.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CHARADD() CHARAND() CHARNOT()
|
||||
CHAROR() CHARXOR() CHARSHL()
|
||||
CHARSHR() CHARRLL() CHARRLR()
|
||||
CSETREF()
|
||||
CharAdd() CharAnd() CharNot()
|
||||
CharOr() CharXor() CharShl()
|
||||
CharShr() CharRll() CharRlr()
|
||||
CSetRef()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CHARSHL()
|
||||
CharShl()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Process each character in a string with bitwise SHIFT LEFT operation
|
||||
$SYNTAX$
|
||||
CHARSHL( <[@]cString>, <nBitsToSHL> ) --> cSHLString
|
||||
CharShl( <[@]cString>, <nBitsToSHL> ) --> cSHLString
|
||||
$ARGUMENTS$
|
||||
<[@]cString> string to be processed
|
||||
<nBitsToSHL> number of bit positions to be shifted to the left
|
||||
$RETURNS$
|
||||
<cSHLString> string with bitwise shifted left characters
|
||||
$DESCRIPTION$
|
||||
The CHARSHL() function constructs a new string from the string
|
||||
The CharShl() function constructs a new string from the string
|
||||
passed as parameter. To do this, it performs a bitwise SHIFT LEFT
|
||||
(SHL) operation to the characters of the string and places a character in
|
||||
the resulting string whose ASCII value equals to the result of that
|
||||
operation.
|
||||
Be aware that bits shifted out of the byte are lost. If you need
|
||||
a bit rotation, use the CHARRLL() function instead.
|
||||
a bit rotation, use the CharRll() function instead.
|
||||
If the string is passed by reference, the resulting string is
|
||||
stored in <cString>, too. By setting the CSETREF()-switch to .T.,
|
||||
stored in <cString>, too. By setting the CSetRef()-switch to .T.,
|
||||
the return value can be omitted.
|
||||
$EXAMPLES$
|
||||
? charshl( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + ;
|
||||
? CharShl( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + ;
|
||||
Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 )
|
||||
// --> Chr(8)+Chr(16)+Chr(32)+Chr(64)+Chr(128)+Chr(0)+Chr(0)+Chr(0)
|
||||
$TESTS$
|
||||
charshl( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + ;
|
||||
CharShl( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + ;
|
||||
Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 ) == Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ) + Chr( 0 ) + Chr( 0 ) + Chr( 0 )
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CHARSHL() is a new function that is only available in Harbour's CT3 lib.
|
||||
CharShl() is a new function that is only available in Harbour's CT3 lib.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CHARADD() CHARSUB() CHARAND()
|
||||
CHAROR() CHARXOR() CHARNOT()
|
||||
CHARSHR() CHARRLL() CHARRLR()
|
||||
CSETREF()
|
||||
CharAdd() CharSub() CharAnd()
|
||||
CharOr() CharXor() CharNot()
|
||||
CharShr() CharRll() CharRlr()
|
||||
CSetRef()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CHARSHR()
|
||||
CharShr()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Process each character in a string with bitwise SHIFT RIGHT operation
|
||||
$SYNTAX$
|
||||
CHARSHR( <[@]cString>, <nBitsToSHR> ) --> cSHRString
|
||||
CharShr( <[@]cString>, <nBitsToSHR> ) --> cSHRString
|
||||
$ARGUMENTS$
|
||||
<[@]cString> string to be processed
|
||||
<nBitsToSHR> number of bit positions to be shifted to the right
|
||||
$RETURNS$
|
||||
<cSHRString> string with bitwise shifted right characters
|
||||
$DESCRIPTION$
|
||||
The CHARSHR() function constructs a new string from the string
|
||||
The CharShr() function constructs a new string from the string
|
||||
passed as parameter. To do this, it performs a bitwise SHIFT RIGHT
|
||||
(SHR) operation to the characters of the string and places a character in
|
||||
the resulting string whose ASCII value equals to the result of that
|
||||
operation.
|
||||
Be aware that bits shifted out of the byte are lost. If you need
|
||||
a bit rotation, use the CHARRLR() function instead.
|
||||
a bit rotation, use the CharRlr() function instead.
|
||||
If the string is passed by reference, the resulting string is
|
||||
stored in <cString>, too. By setting the CSETREF()-switch to .T.,
|
||||
stored in <cString>, too. By setting the CSetRef()-switch to .T.,
|
||||
the return value can be omitted.
|
||||
$EXAMPLES$
|
||||
? charshr( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 )
|
||||
? CharShr( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 )
|
||||
// --> Chr(0)+Chr(0)+Chr(0)+Chr(1)+Chr(2)+Chr(4)+Chr(8)+Chr(16)
|
||||
$TESTS$
|
||||
charshr( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 ) == Chr( 0 ) + Chr( 0 ) + Chr( 0 ) + Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 )
|
||||
CharShr( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 ) == Chr( 0 ) + Chr( 0 ) + Chr( 0 ) + Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 )
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CHARSHR() is a new function that is only available in Harbour's CT3 lib.
|
||||
CharShr() is a new function that is only available in Harbour's CT3 lib.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CHARADD() CHARSUB() CHARAND()
|
||||
CHAROR() CHARXOR() CHARNOT()
|
||||
CHARSHL() CHARRLL() CHARRLR()
|
||||
CSETREF()
|
||||
CharAdd() CharSub() CharAnd()
|
||||
CharOr() CharXor() CharNot()
|
||||
CharShl() CharRll() CharRlr()
|
||||
CSetRef()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CHARRLL()
|
||||
CharRll()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Process each character in a string with bitwise ROLL LEFT operation
|
||||
$SYNTAX$
|
||||
CHARRLL( <[@]cString>, <nBitsToRLL> ) --> cRLLString
|
||||
CharRll( <[@]cString>, <nBitsToRLL> ) --> cRLLString
|
||||
$ARGUMENTS$
|
||||
<[@]cString> string to be processed
|
||||
<nBitsToRLL> number of bit positions to be rolled to the left
|
||||
$RETURNS$
|
||||
<cRLLString> string with bitwise rolled left characters
|
||||
$DESCRIPTION$
|
||||
The CHARRLL() function constructs a new string from the string
|
||||
The CharRll() function constructs a new string from the string
|
||||
passed as parameter. To do this, it performs a bitwise ROLL LEFT
|
||||
(RLL) operation to the characters of the string and places a character in
|
||||
the resulting string whose ASCII value equals to the result of that
|
||||
operation.
|
||||
Be aware that, in contrast to CHARSHL(), bits rolled out on
|
||||
Be aware that, in contrast to CharShl(), bits rolled out on
|
||||
the left are put in again on the right.
|
||||
If the string is passed by reference, the resulting string is
|
||||
stored in <cString>, too. By setting the CSETREF()-switch to .T.,
|
||||
stored in <cString>, too. By setting the CSetRef()-switch to .T.,
|
||||
the return value can be omitted.
|
||||
$EXAMPLES$
|
||||
? charrll( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 )
|
||||
? CharRll( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 )
|
||||
// --> Chr(8)+Chr(16)+Chr(32)+Chr(64)+Chr(128)+Chr(1)+Chr(2)+Chr(4)
|
||||
$TESTS$
|
||||
charrll( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 ) == Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ) + Chr( 1 ) + Chr( 2 ) + Chr( 4 )
|
||||
CharRll( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 ) == Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ) + Chr( 1 ) + Chr( 2 ) + Chr( 4 )
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CHARRLL() is a new function that is only available in Harbour's CT3 lib.
|
||||
CharRll() is a new function that is only available in Harbour's CT3 lib.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CHARADD() CHARSUB() CHARAND()
|
||||
CHAROR() CHARXOR() CHARNOT()
|
||||
CHARSHL() CHARSHR() CHARRLR()
|
||||
CSETREF()
|
||||
CharAdd() CharSub() CharAnd()
|
||||
CharOr() CharXor() CharNot()
|
||||
CharShl() CharShr() CharRlr()
|
||||
CSetRef()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CHARRLR()
|
||||
CharRlr()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Process each character in a string with bitwise ROLL RIGHT operation
|
||||
$SYNTAX$
|
||||
CHARRLR( <[@]cString>, <nBitsToRLR> ) --> cRLRString
|
||||
CharRlr( <[@]cString>, <nBitsToRLR> ) --> cRLRString
|
||||
$ARGUMENTS$
|
||||
<[@]cString> string to be processed
|
||||
<nBitsToRLR> number of bit positions to be rolled to the right
|
||||
$RETURNS$
|
||||
<cRLRString> string with bitwise rolled right characters
|
||||
$DESCRIPTION$
|
||||
The CHARRLR() function constructs a new string from the string
|
||||
The CharRlr() function constructs a new string from the string
|
||||
passed as parameter. To do this, it performs a bitwise ROLL RIGHT
|
||||
(RLR) operation to the characters of the string and places a character in
|
||||
the resulting string whose ASCII value equals to the result of that
|
||||
operation.
|
||||
Be aware that, in contrast to CHARSHR(), bits rolled out on
|
||||
Be aware that, in contrast to CharShr(), bits rolled out on
|
||||
the right are put in again on the left.
|
||||
If the string is passed by reference, the resulting string is
|
||||
stored in <cString>, too. By setting the CSETREF()-switch to .T.,
|
||||
stored in <cString>, too. By setting the CSetRef()-switch to .T.,
|
||||
the return value can be omitted.
|
||||
$EXAMPLES$
|
||||
? charrlr( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 )
|
||||
? CharRlr( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 )
|
||||
// --> Chr(32)+Chr(64)+Chr(128)+Chr(1)+Chr(2)+Chr(4)+Chr(8)+Chr(16)
|
||||
$TESTS$
|
||||
charrlr( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 ) == Chr( 32 ) + Chr( 64 ) + Chr( 128 ) + Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 )
|
||||
CharRlr( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 ) == Chr( 32 ) + Chr( 64 ) + Chr( 128 ) + Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 )
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CHARRLR() is a new function that is only available in Harbour's CT3 lib.
|
||||
CharRlr() is a new function that is only available in Harbour's CT3 lib.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CHARADD() CHARSUB() CHARAND()
|
||||
CHAROR() CHARXOR() CHARNOT()
|
||||
CHARSHL() CHARSHR() CHARRLL()
|
||||
CSETREF()
|
||||
CharAdd() CharSub() CharAnd()
|
||||
CharOr() CharXor() CharNot()
|
||||
CharShl() CharShr() CharRll()
|
||||
CSetRef()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CHARREPL()
|
||||
CharRepl()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Replacement of characters
|
||||
$SYNTAX$
|
||||
CHARREPL( <cSearchString>, <[@]cString>,
|
||||
CharRepl( <cSearchString>, <[@]cString>,
|
||||
<cReplaceString>, [<lMode>] ) -> cString
|
||||
$ARGUMENTS$
|
||||
<cSearchString> is a string of characters that should be replaced
|
||||
@@ -22,7 +22,7 @@
|
||||
$RETURNS$
|
||||
<cString> the processed string
|
||||
$DESCRIPTION$
|
||||
The CHARREPL() function replaces certain characters in <cString>
|
||||
The CharRepl() function replaces certain characters in <cString>
|
||||
with others depending on the setting of <lMode>.
|
||||
If <lMode> is set to .F., the function takes the characters of
|
||||
<cSearchString> one after the other, searches for them in <cString>
|
||||
@@ -38,30 +38,30 @@
|
||||
If <cReplaceString> is shorter than <cSearchString>, the last
|
||||
character of <cReplaceString> is used as corresponding character
|
||||
for the the "rest" of <cSearchString>.
|
||||
One can omit the return value by setting the CSETREF() switch to .T.,
|
||||
One can omit the return value by setting the CSetRef() switch to .T.,
|
||||
but then one must pass <cString> by reference to get the result.
|
||||
$EXAMPLES$
|
||||
? charrepl( "1234", "1x2y3z", "abcd" ) // "axbycz"
|
||||
? charrepl( "abcdefghij", "jhfdb", "1234567890" ) // "08642"
|
||||
? charrepl( "abcdefghij", "jhfdb", "12345" ) // "55542"
|
||||
? charrepl( "1234", "1234", "234A" ) // "AAAA"
|
||||
? charrepl( "1234", "1234", "234A", .T. ) // "234A"
|
||||
? CharRepl( "1234", "1x2y3z", "abcd" ) // "axbycz"
|
||||
? CharRepl( "abcdefghij", "jhfdb", "1234567890" ) // "08642"
|
||||
? CharRepl( "abcdefghij", "jhfdb", "12345" ) // "55542"
|
||||
? CharRepl( "1234", "1234", "234A" ) // "AAAA"
|
||||
? CharRepl( "1234", "1234", "234A", .T. ) // "234A"
|
||||
$TESTS$
|
||||
charrepl( "1234", "1x2y3z", "abcd" ) == "axbycz"
|
||||
charrepl( "abcdefghij", "jhfdb", "1234567890" ) == "08642"
|
||||
charrepl( "abcdefghij", "jhfdb", "12345" ) == "55542"
|
||||
charrepl( "1234", "1234", "234A" ) == "AAAA"
|
||||
charrepl( "1234", "1234", "234A", .T. ) == "234A"
|
||||
CharRepl( "1234", "1x2y3z", "abcd" ) == "axbycz"
|
||||
CharRepl( "abcdefghij", "jhfdb", "1234567890" ) == "08642"
|
||||
CharRepl( "abcdefghij", "jhfdb", "12345" ) == "55542"
|
||||
CharRepl( "1234", "1234", "234A" ) == "AAAA"
|
||||
CharRepl( "1234", "1234", "234A", .T. ) == "234A"
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CHARREPL() is compatible with CT3's CHARREPL().
|
||||
CharRepl() is compatible with CT3's CharRepl().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
WORDREPL() POSREPL() RANGEREPL()
|
||||
CSETREF()
|
||||
WordRepl() PosRepl() RangeRepl()
|
||||
CSetRef()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CHARSORT()
|
||||
CharSort()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Sort sequences within a string.
|
||||
$SYNTAX$
|
||||
CHARSORT( <[@]cString>, [<nElementLength>], [<nCompareLength>],
|
||||
CharSort( <[@]cString>, [<nElementLength>], [<nCompareLength>],
|
||||
[<nIgnoreCharacters>], [<nElemenOffset>], [<nSortLength>],
|
||||
[<lDescending>] ) -> cSortedString
|
||||
$ARGUMENTS$
|
||||
@@ -31,7 +31,7 @@
|
||||
[<nSortLength>] specifies how many characters in <cString>,
|
||||
starting from the <nIgnoreCharacters> position,
|
||||
should be sorted
|
||||
Default: len(cString)-nIgnoreCharacters
|
||||
Default: Len(cString)-nIgnoreCharacters
|
||||
[<lDescending>]) specifies whether the process should
|
||||
sort descending or not
|
||||
$RETURNS$
|
||||
@@ -52,33 +52,33 @@
|
||||
a substring within each element. This substring is determined by the
|
||||
parameters <nElementOffset> and <nCompareLength> and the order
|
||||
by <lDescending>.
|
||||
By setting the CSETREF() switch to .T., one can omit the return value
|
||||
By setting the CSetRef() switch to .T., one can omit the return value
|
||||
of the function, but one must then pass <cString> by reference.
|
||||
$EXAMPLES$
|
||||
? CHARSORT( "qwert" ) // "eqrtw"
|
||||
? CHARSORT( "qwert", 2 ) // "erqwt"
|
||||
? CHARSORT( "b1a4a3a2a1", 2, 1 ) // "a2a1a3a4b1"
|
||||
? CHARSORT( "XXXqwert", 1, 1, 3 ) // "XXXeqrtw"
|
||||
? CHARSORT( "b1a4a3a2a1", 2, 1, 0, 1 ) // "a1b1a2a3a4"
|
||||
? CHARSORT( "384172852", 1, 1, 0, 0, 4 ) // "134872852"
|
||||
? CHARSORT( "qwert", .T. ) // "wtrqe"
|
||||
? CharSort( "qwert" ) // "eqrtw"
|
||||
? CharSort( "qwert", 2 ) // "erqwt"
|
||||
? CharSort( "b1a4a3a2a1", 2, 1 ) // "a2a1a3a4b1"
|
||||
? CharSort( "XXXqwert", 1, 1, 3 ) // "XXXeqrtw"
|
||||
? CharSort( "b1a4a3a2a1", 2, 1, 0, 1 ) // "a1b1a2a3a4"
|
||||
? CharSort( "384172852", 1, 1, 0, 0, 4 ) // "134872852"
|
||||
? CharSort( "qwert", .T. ) // "wtrqe"
|
||||
$TESTS$
|
||||
CHARSORT( "qwert" ) == "eqrtw"
|
||||
CHARSORT( "qwert", 2 ) == "erqwt"
|
||||
CHARSORT( "b1a4a3a2a1", 2, 1 ) == "a2a1a3a4b1"
|
||||
CHARSORT( "XXXqwert", 1, 1, 3 ) == "XXXeqrtw"
|
||||
CHARSORT( "b1a4a3a2a1", 2, 1, 0, 1 ) == "a1b1a2a3a4"
|
||||
CHARSORT( "384172852", 1, 1, 0, 0, 4 ) == "134872852"
|
||||
CHARSORT( "qwert", .T. ) == "wtrqe"
|
||||
CharSort( "qwert" ) == "eqrtw"
|
||||
CharSort( "qwert", 2 ) == "erqwt"
|
||||
CharSort( "b1a4a3a2a1", 2, 1 ) == "a2a1a3a4b1"
|
||||
CharSort( "XXXqwert", 1, 1, 3 ) == "XXXeqrtw"
|
||||
CharSort( "b1a4a3a2a1", 2, 1, 0, 1 ) == "a1b1a2a3a4"
|
||||
CharSort( "384172852", 1, 1, 0, 0, 4 ) == "134872852"
|
||||
CharSort( "qwert", .T. ) == "wtrqe"
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CHARSORT() is compatible with CT3's CHARSORT().
|
||||
CharSort() is compatible with CT3's CharSort().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CSETREF()
|
||||
CSetRef()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,51 +4,51 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CHARSWAP()
|
||||
CharSwap()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Swap neighbouring characters in a string
|
||||
$SYNTAX$
|
||||
CHARSWAP( <[@]cString> ) -> cSwappedString
|
||||
CharSwap( <[@]cString> ) -> cSwappedString
|
||||
$ARGUMENTS$
|
||||
<[@]cString> is the string that should be processed
|
||||
$RETURNS$
|
||||
<cSwappedString> a string where neighbour characters are swapped
|
||||
$DESCRIPTION$
|
||||
The CHARSWAP() function loops through <cString> in steps of two
|
||||
The CharSwap() function loops through <cString> in steps of two
|
||||
characters and exchanges the characters from the odd and the even
|
||||
positions.
|
||||
By setting the CSETREF() switch to .T., one can omit the return value
|
||||
By setting the CSetRef() switch to .T., one can omit the return value
|
||||
of this functin, but one must then pass <cString> by reference.
|
||||
$EXAMPLES$
|
||||
? CHARSWAP( "0123456789" ) // "1032547698"
|
||||
? CHARSWAP( "ABCDEFGHIJK" ) // "BADCFEHGJIK"
|
||||
? CharSwap( "0123456789" ) // "1032547698"
|
||||
? CharSwap( "ABCDEFGHIJK" ) // "BADCFEHGJIK"
|
||||
$TESTS$
|
||||
CHARSWAP( "0123456789" ) == "1032547698"
|
||||
CHARSWAP( "ABCDEFGHIJK" ) == "BADCFEHGJIK"
|
||||
CharSwap( "0123456789" ) == "1032547698"
|
||||
CharSwap( "ABCDEFGHIJK" ) == "BADCFEHGJIK"
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CHARSWAP() is compatible with CT3's CHARSWAP().
|
||||
CharSwap() is compatible with CT3's CharSwap().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
WORDSWAP(),CSETREF()
|
||||
WordSwap(),CSetRef()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
WORDSWAP()
|
||||
WordSwap()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Swap neighbouring double characters in a string
|
||||
$SYNTAX$
|
||||
WORDSWAP( <[@]cString> [, <lSwapCharacters>] ) -> cSwappedString
|
||||
WordSwap( <[@]cString> [, <lSwapCharacters>] ) -> cSwappedString
|
||||
$ARGUMENTS$
|
||||
<[@]cString> is the string that should be processed
|
||||
[<lSwapCharacters>] specifies whether an additional swap should be
|
||||
@@ -58,28 +58,28 @@
|
||||
<cSwappedString> a string where neighbouring double characters are
|
||||
swapped
|
||||
$DESCRIPTION$
|
||||
The WORDSWAP() function loops through <cString> in steps of four
|
||||
The WordSwap() function loops through <cString> in steps of four
|
||||
characters and exchanges the double characters from the first and
|
||||
second position with the one from the third and forth position.
|
||||
Additionally the function can perform a swap of the both char of
|
||||
each double character.
|
||||
By setting the CSETREF() switch to .T., one can omit the return value
|
||||
By setting the CSetRef() switch to .T., one can omit the return value
|
||||
of this functin, but one must then pass <cString> by reference.
|
||||
$EXAMPLES$
|
||||
? WORDSWAP( "1234567890" ) // "3412785690"
|
||||
? WORDSWAP( "1234567890", .T. ) // "4321876590"
|
||||
? WordSwap( "1234567890" ) // "3412785690"
|
||||
? WordSwap( "1234567890", .T. ) // "4321876590"
|
||||
$TESTS$
|
||||
WORDSWAP( "1234567890" ) == "3412785690"
|
||||
WORDSWAP( "1234567890", .T. ) == "4321876590"
|
||||
WordSwap( "1234567890" ) == "3412785690"
|
||||
WordSwap( "1234567890", .T. ) == "4321876590"
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
WORDSWAP() is compatible with CT3's WORDSWAP().
|
||||
WordSwap() is compatible with CT3's WordSwap().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CHARSWAP(),CSETREF()
|
||||
CharSwap(),CSetRef()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
INVERTATTR()
|
||||
InvertAttr()
|
||||
$CATEGORY$
|
||||
CT3 video functions
|
||||
$ONELINER$
|
||||
@@ -24,7 +24,7 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
INVERTATTR() is compatible with CT3's INVERTATTR().
|
||||
InvertAttr() is compatible with CT3's InvertAttr().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
@@ -36,27 +36,27 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
COLORTON()
|
||||
ColorToN()
|
||||
$CATEGORY$
|
||||
CT3 video functions
|
||||
$ONELINER$
|
||||
|
||||
$SYNTAX$
|
||||
COLORTON( <cAttr> ) -> <nAttr>
|
||||
ColorToN( <cAttr> ) -> <nAttr>
|
||||
$ARGUMENTS$
|
||||
<cAttr> Designates the alphanumeric color attribute that is
|
||||
converted in NN/NN or CC/CC form.
|
||||
|
||||
$RETURNS$
|
||||
COLORTON() returns a number that corresponds to the combined numeric
|
||||
ColorToN() returns a number that corresponds to the combined numeric
|
||||
color attribute.
|
||||
|
||||
$DESCRIPTION$
|
||||
COLOR TO (N)umeric
|
||||
The function changes an alphanumeric color attribute from NN/NN or
|
||||
CC/CC into a combined numeric attribute. These combined attribute
|
||||
values are useful with the CA-Cl*pper Tools functions STRSCREEN(),
|
||||
SCREENMIX(), SCREENATTR(), and the CA-Cl*pper commands
|
||||
values are useful with the CA-Cl*pper Tools functions StrScreen(),
|
||||
ScreenMix(), ScreenAttr(), and the CA-Cl*pper commands
|
||||
SAVE/RESTORE SCREEN.
|
||||
|
||||
TODO: add documentation
|
||||
@@ -79,28 +79,28 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
NTOCOLOR()
|
||||
NToColor()
|
||||
$CATEGORY$
|
||||
HBCT video functions
|
||||
$ONELINER$
|
||||
|
||||
$SYNTAX$
|
||||
NTOCOLOR( <nAttr>, [<lColorCode>] ) -> <cAttr>
|
||||
NToColor( <nAttr>, [<lColorCode>] ) -> <cAttr>
|
||||
$ARGUMENTS$
|
||||
<nAttr> Designates the value for the combined numeric color
|
||||
attributes.
|
||||
|
||||
<lColorCode> If designated as .F. or if the parameter is omitted,
|
||||
NTOCOLOR() returns a string with a numeric color code.
|
||||
When designated as .T., NTOCOLOR() returns a string with
|
||||
NToColor() returns a string with a numeric color code.
|
||||
When designated as .T., NToColor() returns a string with
|
||||
the CA-Cl*pper alpha color coding.
|
||||
|
||||
$RETURNS$
|
||||
NTOCOLOR() returns the designated color attribute in the NN/NN
|
||||
NToColor() returns the designated color attribute in the NN/NN
|
||||
or CC/CC form.
|
||||
|
||||
$DESCRIPTION$
|
||||
NTOCOLOR() converts a color attribute returned from another function
|
||||
NToColor() converts a color attribute returned from another function
|
||||
in numeric form, into the alphanumeric data format. Use this
|
||||
attribute in conjunction with the CA-Cl*pper SET COLOR TO command.
|
||||
|
||||
@@ -124,13 +124,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
ENHANCED()
|
||||
Enhanced()
|
||||
$CATEGORY$
|
||||
CT3 video functions
|
||||
$ONELINER$
|
||||
Select the "ENHANCED" color value for output
|
||||
$SYNTAX$
|
||||
ENHANCED() -> <cEmptyString>
|
||||
Enhanced() -> <cEmptyString>
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -144,25 +144,25 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
ENHANCED() is compatible with CT3's ENHANCED()
|
||||
Enhanced() is compatible with CT3's Enhanced()
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
STANDARD(),UNSELECTED()
|
||||
Standard(),Unselected()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
STANDARD()
|
||||
Standard()
|
||||
$CATEGORY$
|
||||
CT3 video functions
|
||||
$ONELINER$
|
||||
Select the "STANDARD" color value for output
|
||||
$SYNTAX$
|
||||
STANDARD() -> <cEmptyString>
|
||||
Standard() -> <cEmptyString>
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -176,25 +176,25 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
STANDARD() is compatible with CT3's STANDARD()
|
||||
Standard() is compatible with CT3's Standard()
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
ENHANCED(),UNSELECTED()
|
||||
Enhanced(),Unselected()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
UNSELECTED()
|
||||
Unselected()
|
||||
$CATEGORY$
|
||||
CT3 video functions
|
||||
$ONELINER$
|
||||
Select the "UNSELECTED" color value for output
|
||||
$SYNTAX$
|
||||
UNSELECTED() -> <cEmptyString>
|
||||
Unselected() -> <cEmptyString>
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -208,12 +208,12 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
UNSELECTED() is compatible with CT3's UNSELECTED()
|
||||
Unselected() is compatible with CT3's Unselected()
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
ENHANCED(),STANDARD()
|
||||
Enhanced(),Standard()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
COUNTLEFT()
|
||||
CountLeft()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Count a certain character at the beginning of a string
|
||||
$SYNTAX$
|
||||
COUNTLEFT( <cString>, [<cSearch|nSearch>] ) -> nCount
|
||||
CountLeft( <cString>, [<cSearch|nSearch>] ) -> nCount
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -24,25 +24,25 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
COUNTLEFT() is compatible with CT3's COUNTLEFT().
|
||||
CountLeft() is compatible with CT3's CountLeft().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
COUNTRIGHT()
|
||||
CountRight()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
COUNTRIGHT()
|
||||
CountRight()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Count a certain character at the end of a string
|
||||
$SYNTAX$
|
||||
COUNTRIGHT( <cString>, [<cSearch|nSearch>] ) -> nCount
|
||||
CountRight( <cString>, [<cSearch|nSearch>] ) -> nCount
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -56,12 +56,12 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
COUNTRIGHT() is compatible with CT3's COUNTRIGHT().
|
||||
CountRight() is compatible with CT3's CountRight().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
COUNTLEFT()
|
||||
CountLeft()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,19 +4,19 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CTINIT()
|
||||
ctinit()
|
||||
$CATEGORY$
|
||||
CT3 general functions
|
||||
$ONELINER$
|
||||
Initializes the CT3 library
|
||||
$SYNTAX$
|
||||
CTINIT() -> lInitialized
|
||||
ctinit() -> lInitialized
|
||||
$ARGUMENTS$
|
||||
None
|
||||
$RETURNS$
|
||||
lInitialized .T. if the function has been correctly initialized
|
||||
$DESCRIPTION$
|
||||
The CTINIT() function initializes the CT3 library.
|
||||
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
|
||||
@@ -28,7 +28,7 @@
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CTINIT() is a new function in Harbour's CT3 library.
|
||||
ctinit() is a new function in Harbour's CT3 library.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
@@ -40,19 +40,19 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CTEXIT()
|
||||
ctexit()
|
||||
$CATEGORY$
|
||||
CT3 general functions
|
||||
$ONELINER$
|
||||
Uninitializes the CT3 library
|
||||
$SYNTAX$
|
||||
CTEXIT() -> nil
|
||||
ctexit() -> nil
|
||||
$ARGUMENTS$
|
||||
none
|
||||
$RETURNS$
|
||||
nil
|
||||
$DESCRIPTION$
|
||||
The CTEXIT() function uninitializes the CT3 library.
|
||||
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
|
||||
@@ -64,7 +64,7 @@
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CTEXIT() is a new function in Harbour's CT3 library.
|
||||
ctexit() is a new function in Harbour's CT3 library.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
|
||||
@@ -4,20 +4,20 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CSETARGERR()
|
||||
CSetArgErr()
|
||||
$CATEGORY$
|
||||
CT3 general functions
|
||||
$ONELINER$
|
||||
Sets argument error behaviour
|
||||
$SYNTAX$
|
||||
CSETARGERR( [<nNewMode>] ) -> <nOldMode>
|
||||
CSetArgErr( [<nNewMode>] ) -> <nOldMode>
|
||||
$ARGUMENTS$
|
||||
[<nNewMode>] New argument error throwing mode
|
||||
$RETURNS$
|
||||
<nOldMode> The current or old argument error throwing mode.
|
||||
$DESCRIPTION$
|
||||
All CT3 functions are very compliant in their reaction to wrong
|
||||
parameters. By using the CSETARGERR() function, you can make the
|
||||
parameters. By using the CSetArgErr() function, you can make the
|
||||
library throw an error with the severity <nNewMode>. It is then
|
||||
up to the error handler to substitute the return value.
|
||||
<nNewMode> can be one of the severity modes defined in ct.ch:
|
||||
@@ -35,7 +35,7 @@
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CSETARGERR() is a new function in Harbour's CT3 library.
|
||||
CSetArgErr() is a new function in Harbour's CT3 library.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
@@ -47,19 +47,19 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CTCINIT()
|
||||
ctcinit()
|
||||
$CATEGORY$
|
||||
CT3 general functions
|
||||
$ONELINER$
|
||||
Initializes the CT3 library, C part
|
||||
$SYNTAX$
|
||||
CTCINIT() -> lInitialized
|
||||
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
|
||||
The ctcinit() function initializes the C source part of the CT3
|
||||
library. Do not call this function directly.
|
||||
$EXAMPLES$
|
||||
|
||||
@@ -68,31 +68,31 @@
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CTCINIT() is a new function in Harbour's CT3 library.
|
||||
ctcinit() is a new function in Harbour's CT3 library.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CTINIT(),CTEXIT()
|
||||
ctinit(),ctexit()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CTCEXIT()
|
||||
ctcexit()
|
||||
$CATEGORY$
|
||||
CT3 general functions
|
||||
$ONELINER$
|
||||
Uninitializes the CT3 library, C part
|
||||
$SYNTAX$
|
||||
CTCEXIT() -> NIL
|
||||
ctcexit() -> NIL
|
||||
$ARGUMENTS$
|
||||
none
|
||||
$RETURNS$
|
||||
nil
|
||||
$DESCRIPTION$
|
||||
The CTCEXIT() function uninitializes the C part of the CT3 library.
|
||||
The ctcexit() function uninitializes the C part of the CT3 library.
|
||||
Do not call this function directly.
|
||||
$EXAMPLES$
|
||||
|
||||
@@ -101,12 +101,12 @@
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CTCEXIT() is a new function in Harbour's CT3 library.
|
||||
ctcexit() is a new function in Harbour's CT3 library.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CTINIT(),CTEXIT()
|
||||
ctinit(),ctexit()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
SETPREC()
|
||||
SetPREC()
|
||||
$CATEGORY$
|
||||
CT3 math functions
|
||||
$ONELINER$
|
||||
Set precision of math functions
|
||||
$SYNTAX$
|
||||
SETPREC( <nPrecision> ) -> cEmptyString
|
||||
SetPREC( <nPrecision> ) -> cEmptyString
|
||||
$ARGUMENTS$
|
||||
<nPrecision> digit count between 1 and 16, defaults to 16
|
||||
$RETURNS$
|
||||
@@ -25,7 +25,7 @@
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
SETPREC() is compatible with CT3's SETPREC.
|
||||
SetPREC() is compatible with CT3's SETPREC.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
@@ -37,13 +37,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
GETPREC()
|
||||
GetPrec()
|
||||
$CATEGORY$
|
||||
CT3 math functions
|
||||
$ONELINER$
|
||||
Get precision of math functions
|
||||
$SYNTAX$
|
||||
GETPREC() -> nDigits
|
||||
GetPrec() -> nDigits
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -58,7 +58,7 @@
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
GETPREC() is compatible with CT3's GETPREC.
|
||||
GetPrec() is compatible with CT3's GETPREC.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
|
||||
@@ -4,30 +4,30 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FLOOR()
|
||||
Floor()
|
||||
$CATEGORY$
|
||||
CT3 math functions
|
||||
$ONELINER$
|
||||
Rounds down a number to the next integer
|
||||
$SYNTAX$
|
||||
FLOOR( <nNumber> ) -> nDownRoundedNumber
|
||||
Floor( <nNumber> ) -> nDownRoundedNumber
|
||||
$ARGUMENTS$
|
||||
<nNumber> number to round down
|
||||
$RETURNS$
|
||||
<nDownRoundedNumber> the rounded number
|
||||
$DESCRIPTION$
|
||||
The function FLOOR() determines the biggest integer that is smaller
|
||||
The function Floor() determines the biggest integer that is smaller
|
||||
than <nNumber>.
|
||||
$EXAMPLES$
|
||||
? floor( 1.1 ) // --> 1.0
|
||||
? floor( -1.1 ) // --> -2.0
|
||||
? Floor( 1.1 ) // --> 1.0
|
||||
? Floor( -1.1 ) // --> -2.0
|
||||
$TESTS$
|
||||
floor( 1.1 ) == 1.0
|
||||
floor( -1.1 ) == -2.0
|
||||
Floor( 1.1 ) == 1.0
|
||||
Floor( -1.1 ) == -2.0
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
FLOOR() is compatible with CT3's FLOOR().
|
||||
Floor() is compatible with CT3's Floor().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
@@ -39,30 +39,30 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CEILING()
|
||||
Ceiling()
|
||||
$CATEGORY$
|
||||
CT3 math functions
|
||||
$ONELINER$
|
||||
Rounds up a number to the next integer
|
||||
$SYNTAX$
|
||||
CEILING( <nNumber> ) -> nUpRoundedNumber
|
||||
Ceiling( <nNumber> ) -> nUpRoundedNumber
|
||||
$ARGUMENTS$
|
||||
<nNumber> number to round up
|
||||
$RETURNS$
|
||||
<nUpRoundedNumber> the rounded number
|
||||
$DESCRIPTION$
|
||||
The function CEILING() determines the smallest integer that is bigger
|
||||
The function Ceiling() determines the smallest integer that is bigger
|
||||
than <nNumber>.
|
||||
$EXAMPLES$
|
||||
? ceiling( 1.1 ) // --> 2.0
|
||||
? ceiling( -1.1 ) // --> -1.0
|
||||
? Ceiling( 1.1 ) // --> 2.0
|
||||
? Ceiling( -1.1 ) // --> -1.0
|
||||
$TESTS$
|
||||
ceiling( 1.1 ) == 2.0
|
||||
ceiling( -1.1 ) == -1.0
|
||||
Ceiling( 1.1 ) == 2.0
|
||||
Ceiling( -1.1 ) == -1.0
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CEILING() is compatible with CT3's CEILING().
|
||||
Ceiling() is compatible with CT3's Ceiling().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
@@ -74,34 +74,34 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
SIGN()
|
||||
Sign()
|
||||
$CATEGORY$
|
||||
CT3 math functions
|
||||
$ONELINER$
|
||||
Sign of a number
|
||||
$SYNTAX$
|
||||
SIGN( <nNumber> ) -> nSign
|
||||
Sign( <nNumber> ) -> nSign
|
||||
$ARGUMENTS$
|
||||
<nNumber> a number
|
||||
$RETURNS$
|
||||
<nSign> sign of <nNumber>
|
||||
$DESCRIPTION$
|
||||
The function SIGN() determines the sign of <nNumber>.
|
||||
If <nNumber> is > 0, then SIGN(<nNumber>) returns 1
|
||||
If <nNumber> is < 0, then SIGN(<nNumber>) returns -1
|
||||
If <nNumber> is == 0, then SIGN(<nNumber>) returns 0
|
||||
The function Sign() determines the sign of <nNumber>.
|
||||
If <nNumber> is > 0, then Sign(<nNumber>) returns 1
|
||||
If <nNumber> is < 0, then Sign(<nNumber>) returns -1
|
||||
If <nNumber> is == 0, then Sign(<nNumber>) returns 0
|
||||
$EXAMPLES$
|
||||
? sign( 1.1 ) // --> 1
|
||||
? sign( -1.1 ) // --> -1
|
||||
? sign( 0.0 ) // --> 0
|
||||
? Sign( 1.1 ) // --> 1
|
||||
? Sign( -1.1 ) // --> -1
|
||||
? Sign( 0.0 ) // --> 0
|
||||
$TESTS$
|
||||
sign( 1.1 ) == 1
|
||||
sign( -1.1 ) == -1
|
||||
sign( 0.0 ) == 0
|
||||
Sign( 1.1 ) == 1
|
||||
Sign( -1.1 ) == -1
|
||||
Sign( 0.0 ) == 0
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
SIGN() is compatible with CT3's SIGN().
|
||||
Sign() is compatible with CT3's Sign().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
@@ -148,34 +148,34 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FACT()
|
||||
Fact()
|
||||
$CATEGORY$
|
||||
CT3 math functions
|
||||
$ONELINER$
|
||||
Calculates faculty
|
||||
$SYNTAX$
|
||||
FACT( <nNumber> ) -> nFaculty
|
||||
Fact( <nNumber> ) -> nFaculty
|
||||
$ARGUMENTS$
|
||||
<nNumber> number between 0 and 21
|
||||
$RETURNS$
|
||||
<nFaculty> the faculty of <nNumber>
|
||||
$DESCRIPTION$
|
||||
The function FACT() calculates the faculty to the integer given in
|
||||
The function Fact() calculates the faculty to the integer given in
|
||||
<nNumber>. The faculty is defined as n! = 1*2*...*n and is often
|
||||
used in statistics. Note, that faculties above 21 are too big
|
||||
so that the function must return a -1.
|
||||
$EXAMPLES$
|
||||
? fact( 0 ) // --> 1
|
||||
? fact( 1 ) // --> 1
|
||||
? fact( 4 ) // --> 24
|
||||
? Fact( 0 ) // --> 1
|
||||
? Fact( 1 ) // --> 1
|
||||
? Fact( 4 ) // --> 24
|
||||
$TESTS$
|
||||
fact( 0 ) == 1
|
||||
fact( 1 ) == 1
|
||||
fact( 4 ) == 24
|
||||
Fact( 0 ) == 1
|
||||
Fact( 1 ) == 1
|
||||
Fact( 4 ) == 24
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
FACT() is compatible with CT3's FACT().
|
||||
Fact() is compatible with CT3's Fact().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
PADLEFT()
|
||||
PadLeft()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Fills string to a certain length on the left
|
||||
$SYNTAX$
|
||||
PADLEFT( <cString>, <nLength>, [<cChar|nChar>] ) -> cString
|
||||
PadLeft( <cString>, <nLength>, [<cChar|nChar>] ) -> cString
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -24,25 +24,25 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
PADLEFT() is compatible with CT3's PADLEFT().
|
||||
PadLeft() is compatible with CT3's PadLeft().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
PADRIGHT()
|
||||
PadRight()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
PADRIGHT()
|
||||
PadRight()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Fills string to a certain length on the right
|
||||
$SYNTAX$
|
||||
PADRIGHT( <cString>, <nLength>, [<cChar|nChar>] ) -> cString
|
||||
PadRight( <cString>, <nLength>, [<cChar|nChar>] ) -> cString
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -56,12 +56,12 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
PADRIGHT() is compatible with CT3's PADRIGHT().
|
||||
PadRight() is compatible with CT3's PadRight().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
PADLEFT()
|
||||
PadLeft()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CSETREF()
|
||||
CSetRef()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Determine return value of reference sensitive CT3 string functions
|
||||
$SYNTAX$
|
||||
CSETREF( [<lNewSwitch>] ) -> lOldSwitch
|
||||
CSetRef( [<lNewSwitch>] ) -> lOldSwitch
|
||||
$ARGUMENTS$
|
||||
[<lNewSwitch>] .T. -> suppress return value
|
||||
.F. -> do not suppress return value
|
||||
@@ -22,15 +22,15 @@
|
||||
change the length of a string passed as parameter while
|
||||
transforming this string:
|
||||
|
||||
ADDASCII() BLANK() CHARADD()
|
||||
CHARAND() CHARMIRR() CHARNOT()
|
||||
CHAROR() CHARRELREP() CHARREPL()
|
||||
CHARSORT() CHARSWAP() CHARXOR()
|
||||
CRYPT() JUSTLEFT() JUSTRIGHT()
|
||||
POSCHAR() POSREPL() RANGEREPL()
|
||||
REPLALL() REPLLEFT() REPLRIGHT()
|
||||
TOKENLOWER() TOKENUPPER() WORDREPL()
|
||||
WORDSWAP()
|
||||
ADDASCII() Blank() CharAdd()
|
||||
CharAnd() CharMirr() CharNot()
|
||||
CharOr() CharRelRep() CharRepl()
|
||||
CharSort() CharSwap() CharXor()
|
||||
Crypt() JustLeft() JustRight()
|
||||
PosChar() PosRepl() RangeRepl()
|
||||
ReplAll() ReplLeft() ReplRight()
|
||||
TokenLower() TokenUpper() WordRepl()
|
||||
WordSwap()
|
||||
|
||||
Thus, these functions allow to pass the string by reference [@] to
|
||||
the function so that it may not be necessary to return the transformed
|
||||
@@ -52,27 +52,27 @@
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
ADDASCII() BLANK() CHARADD()
|
||||
CHARAND() CHARMIRR() CHARNOT()
|
||||
CHAROR() CHARRELREP() CHARREPL()
|
||||
CHARSORT() CHARSWAP() CHARXOR()
|
||||
CRYPT() JUSTLEFT() JUSTRIGHT()
|
||||
POSCHAR() POSREPL() RANGEREPL()
|
||||
REPLALL() REPLLEFT() REPLRIGHT()
|
||||
TOKENLOWER() TOKENUPPER() WORDREPL()
|
||||
WORDSWAP()
|
||||
ADDASCII() Blank() CharAdd()
|
||||
CharAnd() CharMirr() CharNot()
|
||||
CharOr() CharRelRep() CharRepl()
|
||||
CharSort() CharSwap() CharXor()
|
||||
Crypt() JustLeft() JustRight()
|
||||
PosChar() PosRepl() RangeRepl()
|
||||
ReplAll() ReplLeft() ReplRight()
|
||||
TokenLower() TokenUpper() WordRepl()
|
||||
WordSwap()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CSETATMUPA()
|
||||
CSetAtMupa()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Determine "multi-pass" behaviour in some string functions
|
||||
$SYNTAX$
|
||||
CSETATMUPA( [<lNewSwitch>] ) -> lOldSwitch
|
||||
CSetAtMupa( [<lNewSwitch>] ) -> lOldSwitch
|
||||
$ARGUMENTS$
|
||||
[<lNewSwitch>] .T. -> turn "multi-pass" on
|
||||
.F. -> turn "multi-pass" off
|
||||
@@ -82,9 +82,9 @@
|
||||
$DESCRIPTION$
|
||||
CSETATMUPA determines how the following CT3 string functions
|
||||
|
||||
ATNUM() AFTERATNUM() BEFORATNUM()
|
||||
ATREPL() NUMAT() ATADJUST()
|
||||
WORDTOCHAR() WORDREPL()
|
||||
AtNum() AFTERAtNum() BEFORAtNum()
|
||||
AtRepl() NumAt() AtAdjust()
|
||||
WordToChar() WordRepl()
|
||||
|
||||
perform their work. See the respective function documentation for a
|
||||
further description how the switch influences these functions.
|
||||
@@ -102,15 +102,15 @@
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
ATNUM() AFTERATNUM() BEFORATNUM()
|
||||
ATREPL() NUMAT() ATADJUST()
|
||||
WORDTOCHAR() WORDREPL()
|
||||
AtNum() AFTERAtNum() BEFORAtNum()
|
||||
AtRepl() NumAt() AtAdjust()
|
||||
WordToChar() WordRepl()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
SETATLIKE()
|
||||
SetAtLike()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
@@ -135,9 +135,9 @@
|
||||
In the following CT3 functions, strings are compared on a character
|
||||
base:
|
||||
|
||||
ATADJUST() ATNUM() AFTERATNUM()
|
||||
BEFOREATNUM() ATREPL() NUMAT()
|
||||
STRDIFF()
|
||||
AtAdjust() AtNum() AFTERAtNum()
|
||||
BEFOREAtNum() AtRepl() NumAt()
|
||||
StrDiff()
|
||||
|
||||
With the SETATLIKE function, one can determine when characters are
|
||||
considered to match within these functions. If CT_SETATLIKE_WILDCARD
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
BOM()
|
||||
BoM()
|
||||
$CATEGORY$
|
||||
CT3 date and time functions
|
||||
$ONELINER$
|
||||
_B_egin _O_f _M_onth
|
||||
$SYNTAX$
|
||||
BOM( [<dDate>] ) -> dDateBeginOfMonth
|
||||
BoM( [<dDate>] ) -> dDateBeginOfMonth
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -24,25 +24,25 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
BOM() is compatible with CT3's BOM().
|
||||
BoM() is compatible with CT3's BoM().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
EOM(),BOQ(),EOQ(),BOY(),EOY()
|
||||
EoM(),BoQ(),EoQ(),BoY(),EoY()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
EOM()
|
||||
EoM()
|
||||
$CATEGORY$
|
||||
CT3 date and time functions
|
||||
$ONELINER$
|
||||
_E_nd _O_f _M_onth
|
||||
$SYNTAX$
|
||||
EOM( [<dDate>] ) -> dDateEndOfMonth
|
||||
EoM( [<dDate>] ) -> dDateEndOfMonth
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -56,25 +56,25 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
EOM() is compatible with CT3's EOM().
|
||||
EoM() is compatible with CT3's EoM().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
BOM(),BOQ(),EOQ(),BOY(),EOY()
|
||||
BoM(),BoQ(),EoQ(),BoY(),EoY()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
BOQ()
|
||||
BoQ()
|
||||
$CATEGORY$
|
||||
CT3 date and time functions
|
||||
$ONELINER$
|
||||
_B_egin _O_f _Q_uarter
|
||||
$SYNTAX$
|
||||
BOQ( [<dDate>] ) -> dDateBeginOfQuarter
|
||||
BoQ( [<dDate>] ) -> dDateBeginOfQuarter
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -88,25 +88,25 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
BOQ() is compatible with CT3's BOQ().
|
||||
BoQ() is compatible with CT3's BoQ().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
BOM(),EOM(),EOQ(),BOY(),EOY()
|
||||
BoM(),EoM(),EoQ(),BoY(),EoY()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
EOQ()
|
||||
EoQ()
|
||||
$CATEGORY$
|
||||
CT3 date and time functions
|
||||
$ONELINER$
|
||||
_E_nd _O_f _Q_uarter
|
||||
$SYNTAX$
|
||||
EOQ( [<dDate>] ) -> dDateEndOfQuarter
|
||||
EoQ( [<dDate>] ) -> dDateEndOfQuarter
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -120,25 +120,25 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
EOQ() is compatible with CT3's EOQ().
|
||||
EoQ() is compatible with CT3's EoQ().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
BOM(),EOM(),BOQ(),BOY(),EOY()
|
||||
BoM(),EoM(),BoQ(),BoY(),EoY()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
BOY()
|
||||
BoY()
|
||||
$CATEGORY$
|
||||
CT3 date and time functions
|
||||
$ONELINER$
|
||||
_B_egin _O_f _Y_ear
|
||||
$SYNTAX$
|
||||
BOY( [<dDate>] ) -> dDateBeginOfYear
|
||||
BoY( [<dDate>] ) -> dDateBeginOfYear
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -152,25 +152,25 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
BOY() is compatible with CT3's BOY().
|
||||
BoY() is compatible with CT3's BoY().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
BOM(),EOM(),BOQ(),EOQ(),EOY()
|
||||
BoM(),EoM(),BoQ(),EoQ(),EoY()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
EOY()
|
||||
EoY()
|
||||
$CATEGORY$
|
||||
CT3 date and time functions
|
||||
$ONELINER$
|
||||
_E_nd _O_f _Y_ear
|
||||
$SYNTAX$
|
||||
EOY( [<dDate>] ) -> dDateEndOfYear
|
||||
EoY( [<dDate>] ) -> dDateEndOfYear
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -184,12 +184,12 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
EOY() is compatible with CT3's EOY().
|
||||
EoY() is compatible with CT3's EoY().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
BOM(),EOM(),BOQ(),EOQ(),BOY()
|
||||
BoM(),EoM(),BoQ(),EoQ(),BoY()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CTODOW()
|
||||
CToDoW()
|
||||
$CATEGORY$
|
||||
CT3 date and time functions
|
||||
$ONELINER$
|
||||
convert name of day of the week to its ordinal number
|
||||
$SYNTAX$
|
||||
CTODOW( <cName> ) -> nOrdinal
|
||||
CToDoW( <cName> ) -> nOrdinal
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -24,25 +24,25 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
CTODOW() is compatible with CT3's CTODOW().
|
||||
CToDoW() is compatible with CT3's CToDoW().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
NTOCDOW()
|
||||
NToCDoW()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CTOMONTH()
|
||||
CToMonth()
|
||||
$CATEGORY$
|
||||
CT3 date and time functions
|
||||
$ONELINER$
|
||||
convert name of month to its ordinal number
|
||||
$SYNTAX$
|
||||
CTOMONTH( <cName> ) -> nOrdinal
|
||||
CToMonth( <cName> ) -> nOrdinal
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -56,13 +56,13 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
CTOMONTH() is compatible with CT3's CTOMONTH().
|
||||
CToMonth() is compatible with CT3's CToMonth().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
NTOCMONTH()
|
||||
NToCMonth()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
DOY()
|
||||
DoY()
|
||||
$CATEGORY$
|
||||
CT3 date and time functions
|
||||
$ONELINER$
|
||||
@@ -190,7 +190,7 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
DOY() is compatible with CT3's DOY().
|
||||
DoY() is compatible with CT3's DoY().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
@@ -202,13 +202,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
ISLEAP()
|
||||
IsLeap()
|
||||
$CATEGORY$
|
||||
CT3 date and time functions
|
||||
$ONELINER$
|
||||
determines of year of date is a leap year
|
||||
$SYNTAX$
|
||||
ISLEAP( [<dDate>] ) -> lIsLeap
|
||||
IsLeap( [<dDate>] ) -> lIsLeap
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -222,7 +222,7 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
ISLEAP() is compatible with CT3's ISLEAP().
|
||||
IsLeap() is compatible with CT3's IsLeap().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
@@ -234,13 +234,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
DAYSTOMONTH()
|
||||
DaysToMonth()
|
||||
$CATEGORY$
|
||||
CT3 date and time functions
|
||||
$ONELINER$
|
||||
Total number of days from first of Jan to beginning of nMonth.
|
||||
$SYNTAX$
|
||||
DAYSTOMONTH( <nMonth>, <lLeapYear> ) -> nDaysToMonth
|
||||
DaysToMonth( <nMonth>, <lLeapYear> ) -> nDaysToMonth
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -256,19 +256,19 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
DAYSTOMONTH() is a new function in Harbour's CT3 library.
|
||||
DaysToMonth() is a new function in Harbour's CT3 library.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
DAYSINMONTH()
|
||||
DaysInMonth()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
DAYSINMONTH()
|
||||
DaysInMonth()
|
||||
$CATEGORY$
|
||||
CT3 date and time functions
|
||||
$ONELINER$
|
||||
@@ -288,25 +288,25 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
DAYSINMONTH() is a new function in Harbour's CT3 library.
|
||||
DaysInMonth() is a new function in Harbour's CT3 library.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
DAYSTOMONTH()
|
||||
DaysToMonth()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
QUARTER()
|
||||
Quarter()
|
||||
$CATEGORY$
|
||||
CT3 date and time functions
|
||||
$ONELINER$
|
||||
Returns a number equal to the quarter in which a date falls
|
||||
$SYNTAX$
|
||||
QUARTER( [<dDate>] ) -> nQuarter
|
||||
Quarter( [<dDate>] ) -> nQuarter
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -322,7 +322,7 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
QUARTER() is compatible with CT3's QUARTER().
|
||||
Quarter() is compatible with CT3's Quarter().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
@@ -334,20 +334,20 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
LASTDAYOM()
|
||||
LastDayOM()
|
||||
$CATEGORY$
|
||||
CT3 date and time functions
|
||||
$ONELINER$
|
||||
Returns the the number of days in the month.
|
||||
$SYNTAX$
|
||||
LASTDAYOM( [<dDate|nMonth>] ) -> nDaysInMonth
|
||||
LastDayOM( [<dDate|nMonth>] ) -> nDaysInMonth
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
|
||||
$DESCRIPTION$
|
||||
<dDate|nMonth> can be a date or a month number. If empty uses the
|
||||
system date. If nMonth is a 2, lastdayom() will not know if it
|
||||
system date. If nMonth is a 2, LastDayOM() will not know if it
|
||||
is a leap year or not. If dDate is invalid, returns 0
|
||||
TODO: add further documentation
|
||||
$EXAMPLES$
|
||||
@@ -357,25 +357,25 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
LASTDAYOM() is compatible with CT3's LASTDAYOM().
|
||||
LastDayOM() is compatible with CT3's LastDayOM().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
EOM()
|
||||
EoM()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
NTOCDOW()
|
||||
NToCDoW()
|
||||
$CATEGORY$
|
||||
CT3 date and time functions
|
||||
$ONELINER$
|
||||
(num of day) -> day name
|
||||
$SYNTAX$
|
||||
NTOCDOW( <nDay> ) -> cDay
|
||||
NToCDoW( <nDay> ) -> cDay
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -389,25 +389,25 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
NTOCDOW() is compatible with CT3's NTOCDOW().
|
||||
NToCDoW() is compatible with CT3's NToCDoW().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CTODOW()
|
||||
CToDoW()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
NTOCMONTH()
|
||||
NToCMonth()
|
||||
$CATEGORY$
|
||||
CT3 date and time functions
|
||||
$ONELINER$
|
||||
(num of month ) -> Month Name
|
||||
$SYNTAX$
|
||||
NTOCMONTH( <nMonth> ) -> cMonth
|
||||
NToCMonth( <nMonth> ) -> cMonth
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -421,25 +421,25 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
NTOCMONTH() is compatible with CT3's NTOCMONTH().
|
||||
NToCMonth() is compatible with CT3's NToCMonth().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CTOMONTH()
|
||||
CToMonth()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
WEEK()
|
||||
Week()
|
||||
$CATEGORY$
|
||||
CT3 date and time functions
|
||||
$ONELINER$
|
||||
Returns the calendar week a number
|
||||
$SYNTAX$
|
||||
WEEK( [<dDate>][, <lSWN>] ) -> nWeek
|
||||
Week( [<dDate>][, <lSWN>] ) -> nWeek
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -448,7 +448,7 @@
|
||||
Returns the calendar week a number. If no date is specified,
|
||||
the system date is used. An empty date via hb_SToD("")
|
||||
returns 0.
|
||||
If <lSWN> is .T., week() will calculate the "simple week number", defined by
|
||||
If <lSWN> is .T., Week() will calculate the "simple week number", defined by
|
||||
- week #1 starts on January, 1st
|
||||
- week #(n+1) starts seven days after start of week #n
|
||||
If <lSWN> is .F. (default), the ISO8601 week number, defined by
|
||||
@@ -463,7 +463,7 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
WEEK() is compatible with CT3's WEEK().
|
||||
Week() is compatible with CT3's Week().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
|
||||
@@ -4,19 +4,19 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
WAITPERIOD()
|
||||
WaitPeriod()
|
||||
$CATEGORY$
|
||||
HBCT date and time functions
|
||||
$ONELINER$
|
||||
Pauses a specified time in increments of 1/100 seconds
|
||||
$SYNTAX$
|
||||
WAITPERIOD( [<nDelay>] ) --> lNotElapsed
|
||||
WaitPeriod( [<nDelay>] ) --> lNotElapsed
|
||||
$ARGUMENTS$
|
||||
<nDelay> Designates the waiting period at initialization in
|
||||
1/100ths of seconds. Values from 1 to 8, 640, 000 (one day) are
|
||||
possible.
|
||||
$RETURNS$
|
||||
WAITPERIOD() returns .T., if the time span designated at initialization
|
||||
WaitPeriod() returns .T., if the time span designated at initialization
|
||||
has not elapsed.
|
||||
$DESCRIPTION$
|
||||
This function sets a time span for a DO WHILE loop to run.
|
||||
@@ -35,8 +35,8 @@
|
||||
$EXAMPLES$
|
||||
// Run a loop for 5 seconds:
|
||||
|
||||
WAITPERIOD( 500 ) // Initialization, 5 seconds
|
||||
DO WHILE <cond1> .AND. <cond2> .AND. WAITPERIOD()
|
||||
WaitPeriod( 500 ) // Initialization, 5 seconds
|
||||
DO WHILE <cond1> .AND. <cond2> .AND. WaitPeriod()
|
||||
// ...
|
||||
ENDDO
|
||||
$TESTS$
|
||||
@@ -44,7 +44,7 @@
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
WAITPERIOD() is Clipper Tools compatible.
|
||||
WaitPeriod() is Clipper Tools compatible.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
@@ -56,22 +56,22 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
TIMEVALID()
|
||||
TimeValid()
|
||||
$CATEGORY$
|
||||
HBCT Date and Time Functions
|
||||
$ONELINER$
|
||||
Determines whether a specIFied time is valid
|
||||
$SYNTAX$
|
||||
TIMEVALID( <cTime> ) --> lValid
|
||||
TimeValid( <cTime> ) --> lValid
|
||||
$ARGUMENTS$
|
||||
<cTime> Designates a character string that contains the time to
|
||||
test.
|
||||
$RETURNS$
|
||||
TIMEVALID() RETURNs .T. when <cTime> is a valid time; or .F. when
|
||||
TimeValid() RETURNs .T. when <cTime> is a valid time; or .F. when
|
||||
<cTime> is an invalid time.
|
||||
$DESCRIPTION$
|
||||
With input that requires time manipulation, writing your own UDF to
|
||||
check time inputs was unavoidable up to now. TIMEVALID() permits
|
||||
check time inputs was unavoidable up to now. TimeValid() permits
|
||||
Complete checking of a time designation. You can use this FUNCTION
|
||||
effectively with a VALID clause within a READ mask.
|
||||
|
||||
@@ -83,23 +83,23 @@
|
||||
"12:59", "12:59:59", and "12:59:59:99". By contrast, invalid
|
||||
examples are "24", "12:60", or "12:1", and/or "12:". IF you work
|
||||
with time strings that are not completely filled and that you need to
|
||||
check with TIMEVALID(), then they must be TRIMmed prior to the use of
|
||||
TIMEVALID() (see following Examples).
|
||||
check with TimeValid(), then they must be TRIMmed prior to the use of
|
||||
TimeValid() (see following Examples).
|
||||
$EXAMPLES$
|
||||
// Using the VALID clause with TRIM, all valid times are
|
||||
// accepted, even IF no seconds or minutes are specIFied:
|
||||
|
||||
cBegin := Space( 11 )
|
||||
@ 5, 10 SAY "Please input time for beginning work:";
|
||||
GET cBegin VALID TIMEVALID( RTrim( cBegin ) )
|
||||
GET cBegin VALID TimeValid( RTrim( cBegin ) )
|
||||
READ
|
||||
|
||||
// Using a VALID clause without TRIM, hours and minutes must be
|
||||
// specified, so that TIMEVALID() can confirm a valid time:
|
||||
// specified, so that TimeValid() can confirm a valid time:
|
||||
|
||||
cBegin := Space( 5 )
|
||||
@ 5, 10 SAY "Please input time for beginning work:";
|
||||
GET cBegin VALID TIMEVALID( cBegin )
|
||||
GET cBegin VALID TimeValid( cBegin )
|
||||
READ
|
||||
$TESTS$
|
||||
|
||||
@@ -112,19 +112,19 @@
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
SETTIME()
|
||||
SetTime()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
SETTIME()
|
||||
SetTime()
|
||||
$CATEGORY$
|
||||
HBCT Date and Time Functions
|
||||
$ONELINER$
|
||||
Sets the system clock
|
||||
$SYNTAX$
|
||||
SETTIME( <cTime>, [<lMode>] ) --> lSet
|
||||
SetTime( <cTime>, [<lMode>] ) --> lSet
|
||||
$ARGUMENTS$
|
||||
<cTime> Designates a character string that contains the time that
|
||||
is to become the system time.
|
||||
@@ -144,15 +144,15 @@
|
||||
// on an AT:
|
||||
|
||||
cNewTime := "10:20:00"
|
||||
IF ISAT()
|
||||
SETTIME( cNewTime, .T. )
|
||||
IF IsAt()
|
||||
SetTime( cNewTime, .T. )
|
||||
ELSE
|
||||
SETTIME( cNewTime )
|
||||
SetTime( cNewTime )
|
||||
ENDIF
|
||||
|
||||
Or, more compactly:
|
||||
|
||||
SETTIME( cNewTime, ISAT() )
|
||||
SetTime( cNewTime, IsAt() )
|
||||
$TESTS$
|
||||
|
||||
$STATUS$
|
||||
@@ -164,19 +164,19 @@
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
SETDATE(),TIMEVALID()
|
||||
SetDate(),TimeValid()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
SETDATE()
|
||||
SetDate()
|
||||
$CATEGORY$
|
||||
HBCT Date and Time Functions
|
||||
$ONELINER$
|
||||
Sets the system date
|
||||
$SYNTAX$
|
||||
SETDATE( <dDate>, [<lMode>] ) --> lSet
|
||||
SetDate( <dDate>, [<lMode>] ) --> lSet
|
||||
$ARGUMENTS$
|
||||
<dDate> Designates which date to use to set the system date.
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
plataform this adjust is automatic, therefore this parameter is without
|
||||
efect.
|
||||
$RETURNS$
|
||||
SETDATE() RETURNs .T. when the date is successfully set.
|
||||
SetDate() RETURNs .T. when the date is successfully set.
|
||||
$DESCRIPTION$
|
||||
When you use this FUNCTION to set the system date from within your
|
||||
application, all files acquire this date with each write procedure.
|
||||
@@ -194,15 +194,15 @@
|
||||
// on an AT:
|
||||
|
||||
dNewDate := SToD( "19910730" )
|
||||
IF ISAT()
|
||||
SETDATE( dNewDate, .T. )
|
||||
IF IsAt()
|
||||
SetDate( dNewDate, .T. )
|
||||
ELSE
|
||||
SETDATE( dNewDate )
|
||||
SetDate( dNewDate )
|
||||
ENDIF
|
||||
|
||||
Or, more compactly:
|
||||
|
||||
SETDATE( dNewDate, ISAT() )
|
||||
SetDate( dNewDate, IsAt() )
|
||||
$TESTS$
|
||||
|
||||
$STATUS$
|
||||
@@ -214,6 +214,6 @@
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
SETTIME()
|
||||
SetTime()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,26 +4,26 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
MANTISSA()
|
||||
Mantissa()
|
||||
$CATEGORY$
|
||||
CT3 number and bit manipulation functions
|
||||
$ONELINER$
|
||||
Evaluate the mantissa of a floating point number
|
||||
$SYNTAX$
|
||||
MANTISSA( <nFloatingPointNumber> ) --> nMantissa
|
||||
Mantissa( <nFloatingPointNumber> ) --> nMantissa
|
||||
$ARGUMENTS$
|
||||
<nFloatingPointNumber> Designate any Harbour number.
|
||||
$RETURNS$
|
||||
MANTISSA() returns the mantissa of the <nFloatingPointNumber> number.
|
||||
Mantissa() returns the mantissa of the <nFloatingPointNumber> number.
|
||||
$DESCRIPTION$
|
||||
This function supplements EXPONENT() to return the mantissa of the
|
||||
This function supplements Exponent() to return the mantissa of the
|
||||
<nFloatingPointNumber> number.
|
||||
|
||||
Note: The mantissa value can be 0 or in the range of 1 to 2.
|
||||
|
||||
The following calculation reproduces the original value:
|
||||
|
||||
MANTISSA( <nFloatingPointNumber> ) * 2 ^ EXPONENT( <nFloatingPointNumber> ) =
|
||||
Mantissa( <nFloatingPointNumber> ) * 2 ^ Exponent( <nFloatingPointNumber> ) =
|
||||
<nFloatingPointNumber>
|
||||
|
||||
TODO: add documentation
|
||||
@@ -34,43 +34,43 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
MANTISSA() is compatible with CT3's MANTISSA().
|
||||
Mantissa() is compatible with CT3's Mantissa().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
EXPONENT()
|
||||
Exponent()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
EXPONENT()
|
||||
Exponent()
|
||||
$CATEGORY$
|
||||
CT3 number and bit manipulation functions
|
||||
$ONELINER$
|
||||
Evaluate the exponent of a floating point number
|
||||
$SYNTAX$
|
||||
EXPONENT( <nFloatingPointNumber> ) --> nExponent
|
||||
Exponent( <nFloatingPointNumber> ) --> nExponent
|
||||
$ARGUMENTS$
|
||||
<nFloatingPointNumber> Designate any Harbour number.
|
||||
$RETURNS$
|
||||
EXPONENT() returns the exponent of the <nFloatingPointNumber> number
|
||||
Exponent() returns the exponent of the <nFloatingPointNumber> number
|
||||
in base 2.
|
||||
$DESCRIPTION$
|
||||
This function supplements MANTISSA() to return the exponent of the
|
||||
This function supplements Mantissa() to return the exponent of the
|
||||
<nFloatingPointNumber> number.
|
||||
|
||||
Values > 1 or values < -1 return a positive number 0 to 1023.
|
||||
|
||||
Values < 1 or values > -1 return a negative number -1 to -1023.
|
||||
|
||||
The EXPONENT( 0 ), return 0.
|
||||
The Exponent( 0 ), return 0.
|
||||
|
||||
The following calculation reproduces the original value:
|
||||
|
||||
2^EXPONENT(<nFloatingPointNumber>) * MANTISSA(<nFloatingPointNumber>) =
|
||||
2^Exponent(<nFloatingPointNumber>) * Mantissa(<nFloatingPointNumber>) =
|
||||
<nFloatingPointNumber>
|
||||
|
||||
TODO: add documentation
|
||||
@@ -81,12 +81,12 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
EXPONENT() is compatible with CT3's EXPONENT()
|
||||
Exponent() is compatible with CT3's Exponent()
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
MANTISSA()
|
||||
Mantissa()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -37,10 +37,10 @@
|
||||
// Payment of 1000 per year for 10 years at a interest rate
|
||||
// of 5 per cent per year
|
||||
|
||||
? fv( 1000, 0.05, 10 ) // --> 12577.893
|
||||
? FV( 1000, 0.05, 10 ) // --> 12577.893
|
||||
$TESTS$
|
||||
fv( 1000, 0.00, 10 ) == 10000.0
|
||||
fv( 1000, 0.05, 10 ) == 12577.893
|
||||
FV( 1000, 0.00, 10 ) == 10000.0
|
||||
FV( 1000, 0.05, 10 ) == 12577.893
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
@@ -50,7 +50,7 @@
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
PV(),PAYMENT(),PERIODS(),RATE()
|
||||
PV(),Payment(),Periods(),RATE()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -88,10 +88,10 @@
|
||||
// of 6000 Dollars (the amount you will pay back) the bank will pay
|
||||
// you
|
||||
|
||||
? pv( 100, 0.005, 60 ) // --> 5172.56
|
||||
? PV( 100, 0.005, 60 ) // --> 5172.56
|
||||
$TESTS$
|
||||
pv( 100, 0.0, 60 ) == 6000.0
|
||||
pv( 100, 0.005, 60 ) == 5172.56
|
||||
PV( 100, 0.0, 60 ) == 6000.0
|
||||
PV( 100, 0.005, 60 ) == 5172.56
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
@@ -101,19 +101,19 @@
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
FV(),PAYMENT(),PERIODS(),RATE()
|
||||
FV(),Payment(),Periods(),RATE()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
PAYMENT()
|
||||
Payment()
|
||||
$CATEGORY$
|
||||
CT3 math functions
|
||||
$ONELINER$
|
||||
Payments for a loan
|
||||
$SYNTAX$
|
||||
PAYMENT( nLoan, nInterest, nPeriods ) --> nPayment
|
||||
Payment( nLoan, nInterest, nPeriods ) --> nPayment
|
||||
$ARGUMENTS$
|
||||
<nLoan> amount of money you get from the bank
|
||||
<nInterest> rate of interest per period, 1 == 100%
|
||||
@@ -122,7 +122,7 @@
|
||||
<nPayment> Periodical payment one has to make to pay the
|
||||
loan <nLoan> back
|
||||
$DESCRIPTION$
|
||||
PAYMENT() calculates the payment one has to make periodically
|
||||
Payment() calculates the payment one has to make periodically
|
||||
to pay back a loan <nLoan> within <nPeriods> periods and for a
|
||||
rate of interest <nInterest> per period.
|
||||
debt in period 0 = <nLoan>
|
||||
@@ -137,32 +137,32 @@
|
||||
// month (6% per year).
|
||||
// For 5 years, you have to pay back every month
|
||||
|
||||
? payment( 5172.56, 0.005, 60 ) // --> 100.00
|
||||
? Payment( 5172.56, 0.005, 60 ) // --> 100.00
|
||||
$TESTS$
|
||||
payment( 5172.56, 0.0, 60 ) == 86.21
|
||||
payment( 5172.56, 0.005, 60 ) == 100.00
|
||||
Payment( 5172.56, 0.0, 60 ) == 86.21
|
||||
Payment( 5172.56, 0.005, 60 ) == 100.00
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
PAYMENT() is compatible with CT3's PAYMENT().
|
||||
Payment() is compatible with CT3's Payment().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
PV(),FV(),PERIODS(),RATE()
|
||||
PV(),FV(),Periods(),RATE()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
PERIODS()
|
||||
Periods()
|
||||
$CATEGORY$
|
||||
CT3 math functions
|
||||
$ONELINER$
|
||||
Number of periods for a loan
|
||||
$SYNTAX$
|
||||
PERIODS( nLoan, nPayment, nInterest ) --> nPeriods
|
||||
Periods( nLoan, nPayment, nInterest ) --> nPeriods
|
||||
$ARGUMENTS$
|
||||
<nLoan> amount of money you get from the bank
|
||||
<nPayment> amount of money you pay back per period
|
||||
@@ -170,7 +170,7 @@
|
||||
$RETURNS$
|
||||
<nPeriods> number of periods you need to pay the loan back
|
||||
$DESCRIPTION$
|
||||
PERIODS() calculates the number of periods one needs to pay back
|
||||
Periods() calculates the number of periods one needs to pay back
|
||||
a loan of <nLoan> with periodical payments of <nPayment> and for a
|
||||
rate of interest <nInterest> per period.
|
||||
debt in period 0 = <nLoan>
|
||||
@@ -189,22 +189,22 @@
|
||||
// month (6% per year).
|
||||
// You can afford to pay 100 back every month, so you need
|
||||
|
||||
? periods( 5172.56, 100, 0.005 ) // --> 60.0
|
||||
? Periods( 5172.56, 100, 0.005 ) // --> 60.0
|
||||
|
||||
// months to cancel the loan.
|
||||
$TESTS$
|
||||
periods( 5172.56, 100, 0.005 ) == 60.0
|
||||
periods( 5172.56, 100, 0.0 ) == 51.7256
|
||||
Periods( 5172.56, 100, 0.005 ) == 60.0
|
||||
Periods( 5172.56, 100, 0.0 ) == 51.7256
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
PERIODS() is compatible with CT3's PERIODS().
|
||||
Periods() is compatible with CT3's Periods().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
PV(),FV(),PAYMENT(),RATE()
|
||||
PV(),FV(),Payment(),RATE()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
$DESCRIPTION$
|
||||
RATE() calculates the rate of interest per period for the given
|
||||
loan, payment per periods and number of periods. This is done with
|
||||
the same equation used in the PAYMENT() or PERIODS() function:
|
||||
the same equation used in the Payment() or Periods() function:
|
||||
|
||||
<nPayment> = <nLoan>*(<nInterest>/100)/(1-(1+<nInterest>/100)^(-<nPeriods>))
|
||||
|
||||
@@ -250,6 +250,6 @@
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
PV(),FV(),PAYMENT(),PERIODS()
|
||||
PV(),FV(),Payment(),Periods()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -39,19 +39,19 @@
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CTOF(), XTOC()
|
||||
CToF(), XToC()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CTOF()
|
||||
CToF()
|
||||
$CATEGORY$
|
||||
CT3 number and bit manipulation functions
|
||||
$ONELINER$
|
||||
|
||||
$SYNTAX$
|
||||
CTOF( <cFloatingPointNumber> ) --> nFloatingPointNumber
|
||||
CToF( <cFloatingPointNumber> ) --> nFloatingPointNumber
|
||||
|
||||
$ARGUMENTS$
|
||||
<cFloatingPointNumber> Designate a string that contains a Harbour
|
||||
@@ -60,11 +60,11 @@
|
||||
could produce different format in the string returned by FTOC().
|
||||
|
||||
$RETURNS$
|
||||
CTOF() return the floating point number that corresponds to the
|
||||
CToF() return the floating point number that corresponds to the
|
||||
string passed.
|
||||
|
||||
$DESCRIPTION$
|
||||
Character strings created with FTOC() or XTOC() are convert into
|
||||
Character strings created with FTOC() or XToC() are convert into
|
||||
Harbour floating point number
|
||||
|
||||
TODO: add documentation
|
||||
@@ -81,6 +81,6 @@
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
FTOC(), XTOC()
|
||||
FTOC(), XToC()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
JUSTLEFT()
|
||||
JustLeft()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Move characters from the beginning to the end of a string
|
||||
$SYNTAX$
|
||||
JUSTLEFT( <[@]cString>, [<cChar>|<nChar>] ) -> cJustifiedString
|
||||
JustLeft( <[@]cString>, [<cChar>|<nChar>] ) -> cJustifiedString
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -24,25 +24,25 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
JUSTLEFT() is compatible with CT3's JUSTLEFT().
|
||||
JustLeft() is compatible with CT3's JustLeft().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
JUSTRIGHT()
|
||||
JustRight()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
JUSTRIGHT()
|
||||
JustRight()
|
||||
$CATEGORY$
|
||||
Harbour Tools string functions
|
||||
$ONELINER$
|
||||
Move characters from the end to the beginning of a string
|
||||
$SYNTAX$
|
||||
JUSTRIGHT( <[@]cString>, [<cChar>|<nChar>] ) -> cJustifiedString
|
||||
JustRight( <[@]cString>, [<cChar>|<nChar>] ) -> cJustifiedString
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -56,12 +56,12 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
JUSTRIGHT() is compatible with CT3's JUSTRIGHT().
|
||||
JustRight() is compatible with CT3's JustRight().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
JUSTLEFT()
|
||||
JustLeft()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
KSETINS()
|
||||
KSetIns()
|
||||
$CATEGORY$
|
||||
CT3 switch and state functions
|
||||
$ONELINER$
|
||||
|
||||
$SYNTAX$
|
||||
KSETINS( [<lNewSwitch>] ) -> lOldSwitch
|
||||
KSetIns( [<lNewSwitch>] ) -> lOldSwitch
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -36,13 +36,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
KSETCAPS()
|
||||
KSetCaps()
|
||||
$CATEGORY$
|
||||
CT3 switch and state functions
|
||||
$ONELINER$
|
||||
|
||||
$SYNTAX$
|
||||
KSETCAPS( [<lNewSwitch>] ) -> lOldSwitch
|
||||
KSetCaps( [<lNewSwitch>] ) -> lOldSwitch
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -68,13 +68,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
KSETNUM()
|
||||
KSetNum()
|
||||
$CATEGORY$
|
||||
CT3 switch and state functions
|
||||
$ONELINER$
|
||||
|
||||
$SYNTAX$
|
||||
KSETNUM( [<lNewSwitch>] ) -> lOldSwitch
|
||||
KSetNum( [<lNewSwitch>] ) -> lOldSwitch
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -100,13 +100,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
KSETSCROLL()
|
||||
KSetScroll()
|
||||
$CATEGORY$
|
||||
CT3 switch and state functions
|
||||
$ONELINER$
|
||||
|
||||
$SYNTAX$
|
||||
KSETSCROLL( [<lNewSwitch>] ) -> lOldSwitch
|
||||
KSetScroll( [<lNewSwitch>] ) -> lOldSwitch
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
|
||||
@@ -4,20 +4,20 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
XTOC()
|
||||
XToC()
|
||||
$CATEGORY$
|
||||
CT3 miscellaneous functions
|
||||
$ONELINER$
|
||||
|
||||
$SYNTAX$
|
||||
XTOC( <expValue> ) --> cValue
|
||||
XToC( <expValue> ) --> cValue
|
||||
|
||||
$ARGUMENTS$
|
||||
<expValue> Designate an expression of some of the following data
|
||||
type: NUMBER, CHARACTER, DATE, LOGICAL.
|
||||
|
||||
$RETURNS$
|
||||
XTOC() return a string with the representation of data type of
|
||||
XToC() return a string with the representation of data type of
|
||||
expValue.
|
||||
|
||||
$DESCRIPTION$
|
||||
@@ -28,7 +28,7 @@
|
||||
-----------------------------------------------------------
|
||||
Numeric sizeof( DOUBLE ) FTOC()
|
||||
Logical 1
|
||||
Date 8 DTOS()
|
||||
Date 8 DToS()
|
||||
String Unchanged
|
||||
-----------------------------------------------------------
|
||||
|
||||
@@ -46,6 +46,6 @@
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CTOF(), FTOC()
|
||||
CToF(), FTOC()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,87 +4,87 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CELSIUS()
|
||||
Celsius()
|
||||
$CATEGORY$
|
||||
CT3 numeric functions
|
||||
$ONELINER$
|
||||
Temperature conversion Fahrenheit to Celsius
|
||||
$SYNTAX$
|
||||
CELSIUS( nDegreeFahrenheit ) --> nDegreeCelsius
|
||||
Celsius( nDegreeFahrenheit ) --> nDegreeCelsius
|
||||
$ARGUMENTS$
|
||||
<nDegreeFahrenheit> temperature in degree Fahrenheit
|
||||
$RETURNS$
|
||||
<nDegreeCelsius> temperate in degree Celsius
|
||||
$DESCRIPTION$
|
||||
CELSIUS() converts temperature values measured in the Fahrenheit scale
|
||||
Celsius() converts temperature values measured in the Fahrenheit scale
|
||||
to the Celsius scale.
|
||||
$EXAMPLES$
|
||||
// melting point of water in standard conditions
|
||||
? celsius( 32.0 ) // --> 0.0
|
||||
? Celsius( 32.0 ) // --> 0.0
|
||||
// boiling point of water in standard conditions
|
||||
? celsius( 212.0 ) // --> 100.0
|
||||
? Celsius( 212.0 ) // --> 100.0
|
||||
$TESTS$
|
||||
celsius( 32.0 ) == 0.0
|
||||
celsius( 212.0 ) == 100.0
|
||||
Celsius( 32.0 ) == 0.0
|
||||
Celsius( 212.0 ) == 100.0
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
CELSIUS() is compatible with CT3's CELSIUS().
|
||||
Celsius() is compatible with CT3's Celsius().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
FAHRENHEIT()
|
||||
Fahrenheit()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FAHRENHEIT()
|
||||
Fahrenheit()
|
||||
$CATEGORY$
|
||||
CT3 numeric functions
|
||||
$ONELINER$
|
||||
Temperature conversion Celsius to Fahrenheit
|
||||
$SYNTAX$
|
||||
FAHRENHEIT( nDegreeCelsius ) --> nDegreeFahrenheit
|
||||
Fahrenheit( nDegreeCelsius ) --> nDegreeFahrenheit
|
||||
$ARGUMENTS$
|
||||
<nDegreeCelsius> temperate in degree Celsius
|
||||
$RETURNS$
|
||||
<nDegreeFahrenheit> temperature in degree Fahrenheit
|
||||
$DESCRIPTION$
|
||||
FAHRENHEIT() converts temperature values measured in the Celsius scale
|
||||
Fahrenheit() converts temperature values measured in the Celsius scale
|
||||
to the Fahrenheit scale.
|
||||
$EXAMPLES$
|
||||
// melting point of water in standard conditions
|
||||
? fahrenheit( 0.0 ) // --> 32.0
|
||||
? Fahrenheit( 0.0 ) // --> 32.0
|
||||
// boiling point of water in standard conditions
|
||||
? fahrenheit( 100.0 ) // --> 212.0
|
||||
? Fahrenheit( 100.0 ) // --> 212.0
|
||||
$TESTS$
|
||||
fahrenheit( 0.0 ) == 32.0
|
||||
celsius( 100.0 ) == 212.0
|
||||
Fahrenheit( 0.0 ) == 32.0
|
||||
Celsius( 100.0 ) == 212.0
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
FAHRENHEIT() is compatible with CT3's FAHRENHEIT().
|
||||
Fahrenheit() is compatible with CT3's Fahrenheit().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CELSIUS()
|
||||
Celsius()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
INFINITY()
|
||||
Infinity()
|
||||
$CATEGORY$
|
||||
CT3 numeric functions
|
||||
$ONELINER$
|
||||
Returns the largest floating point number available in the system
|
||||
$SYNTAX$
|
||||
INFINITY( [<lPlatformIndependant>] ) --> nLargestNumber
|
||||
Infinity( [<lPlatformIndependant>] ) --> nLargestNumber
|
||||
$ARGUMENTS$
|
||||
[<lPlatformIndependant>] .T., if the function should return
|
||||
the maximum floating point value
|
||||
@@ -95,7 +95,7 @@
|
||||
$RETURNS$
|
||||
<nLargestNumber> the largest floating point number available in the system
|
||||
$DESCRIPTION$
|
||||
INFINITY() returns the largest floating point number available
|
||||
Infinity() returns the largest floating point number available
|
||||
in the system. For platform independance, this is set to DBL_MAX.
|
||||
$EXAMPLES$
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
INFINITY() must not necessarily return the same number as CT3's INFINITY().
|
||||
Infinity() must not necessarily return the same number as CT3's Infinity().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
NUMAT()
|
||||
NumAt()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Number of occurrences of a sequence in a string
|
||||
$SYNTAX$
|
||||
NUMAT( <cStringToMatch>, <cString>, [<nIgnore>] ) --> nCount
|
||||
NumAt( <cStringToMatch>, <cString>, [<nIgnore>] ) --> nCount
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -24,12 +24,12 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
NUMAT() is compatible with CT3's NUMAT().
|
||||
NumAt() is compatible with CT3's NumAt().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CSETATMUPA(),SETATLIKE()
|
||||
CSetAtMupa(),SetAtLike()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
NTOC()
|
||||
NToC()
|
||||
$CATEGORY$
|
||||
CT3 number and bit manipulation functions
|
||||
$ONELINER$
|
||||
|
||||
$SYNTAX$
|
||||
NTOC( <xNumber>[, <nBase>][,<nLength>][,<cPadChar>] ) -> <cNumber>
|
||||
NToC( <xNumber>[, <nBase>][,<nLength>][,<cPadChar>] ) -> <cNumber>
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -30,19 +30,19 @@
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CTON()
|
||||
CToN()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CTON()
|
||||
CToN()
|
||||
$CATEGORY$
|
||||
CT3 number and bit manipulation functions
|
||||
$ONELINER$
|
||||
|
||||
$SYNTAX$
|
||||
CTON( <xNumber>[, <nBase>][,<lMode>] ) -> <nNumber>
|
||||
CToN( <xNumber>[, <nBase>][,<lMode>] ) -> <nNumber>
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -62,19 +62,19 @@
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
NTOC()
|
||||
NToC()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
BITTOC()
|
||||
BitToC()
|
||||
$CATEGORY$
|
||||
CT3 number and bit manipulation functions
|
||||
$ONELINER$
|
||||
|
||||
$SYNTAX$
|
||||
BITTOC( <nInteger>, <cBitPattern>[,<lMode>] ) -> <cBitString>
|
||||
BitToC( <nInteger>, <cBitPattern>[,<lMode>] ) -> <cBitString>
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -94,19 +94,19 @@
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CTOBIT()
|
||||
CToBit()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CTOBIT()
|
||||
CToBit()
|
||||
$CATEGORY$
|
||||
CT3 number and bit manipulation functions
|
||||
$ONELINER$
|
||||
|
||||
$SYNTAX$
|
||||
CTOBIT( <cBitString>, <cBitPattern> ) -> <nWord>
|
||||
CToBit( <cBitString>, <cBitPattern> ) -> <nWord>
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -126,6 +126,6 @@
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
BITTOC()
|
||||
BitToC()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
POSALPHA()
|
||||
PosAlpha()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Left-most position of a letter in a string
|
||||
$SYNTAX$
|
||||
POSALPHA( <cString>, [<lMode>], [<nIgnore>] ) -> nPosition
|
||||
PosAlpha( <cString>, [<lMode>], [<nIgnore>] ) -> nPosition
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -24,25 +24,25 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
POSALPHA() is compatible with CT3's POSALPHA().
|
||||
PosAlpha() is compatible with CT3's PosAlpha().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
POSLOWER(),POSUPPER(),POSRANGE()
|
||||
PosLower(),PosUpper(),PosRange()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
POSLOWER()
|
||||
PosLower()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Left-most position of a lowercase letter in a string
|
||||
$SYNTAX$
|
||||
POSLOWER( <cString>, [<lMode>], [<nIgnore>] ) -> nPosition
|
||||
PosLower( <cString>, [<lMode>], [<nIgnore>] ) -> nPosition
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -56,25 +56,25 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
POSLOWER() is compatible with CT3's POSLOWER().
|
||||
PosLower() is compatible with CT3's PosLower().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
POSALPHA(),POSUPPER(),POSRANGE()
|
||||
PosAlpha(),PosUpper(),PosRange()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
POSRANGE()
|
||||
PosRange()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Left-most position of a character from a set in a string
|
||||
$SYNTAX$
|
||||
POSRANGE( <cChar1>, <cChar2>, <cString>, [<lMode>],
|
||||
PosRange( <cChar1>, <cChar2>, <cString>, [<lMode>],
|
||||
[<nIgnore>] ) -> nPosition
|
||||
$ARGUMENTS$
|
||||
|
||||
@@ -89,25 +89,25 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
POSRANGE() is compatible with CT3's POSRANGE().
|
||||
PosRange() is compatible with CT3's PosRange().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
POSALPHA(),POSLOWER(),POSUPPER()
|
||||
PosAlpha(),PosLower(),PosUpper()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
POSUPPER()
|
||||
PosUpper()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Left-most position of an uppercase letter in a string
|
||||
$SYNTAX$
|
||||
POSUPPER( <cString>, [<lMode>], [<nIgnore>] ) -> nPosition
|
||||
PosUpper( <cString>, [<lMode>], [<nIgnore>] ) -> nPosition
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -121,12 +121,12 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
POSUPPER() is compatible with CT3's POSUPPER().
|
||||
PosUpper() is compatible with CT3's PosUpper().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
POSALPHA(),POSLOWER(),POSRANGE()
|
||||
PosAlpha(),PosLower(),PosRange()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
POSCHAR()
|
||||
PosChar()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Replace character at a certain position within a string
|
||||
$SYNTAX$
|
||||
POSCHAR( <[@]cString>, <cCharacter|nCharacter>, [<nPosition>] ) -> cString
|
||||
PosChar( <[@]cString>, <cCharacter|nCharacter>, [<nPosition>] ) -> cString
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -24,25 +24,25 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
POSCHAR() is compatible with CT3's POSCHAR().
|
||||
PosChar() is compatible with CT3's PosChar().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
POSDEL(),POSINS(),POSREPL(),CSETREF()
|
||||
PosDel(),PosIns(),PosRepl(),CSetRef()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
POSDEL()
|
||||
PosDel()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Delete characters at a certain position within a string
|
||||
$SYNTAX$
|
||||
POSDEL( <cString>, [<nStartPosition>], <nLength> ) -> cString
|
||||
PosDel( <cString>, [<nStartPosition>], <nLength> ) -> cString
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -56,25 +56,25 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
POSDEL() is compatible with CT3's POSDEL().
|
||||
PosDel() is compatible with CT3's PosDel().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
POSCHAR(),POSINS(),POSREPL()
|
||||
PosChar(),PosIns(),PosRepl()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
POSINS()
|
||||
PosIns()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Insert characters at a certain position within a string
|
||||
$SYNTAX$
|
||||
POSINS( <cString>, <cInsert>, [<nPosition>] ) -> cString
|
||||
PosIns( <cString>, <cInsert>, [<nPosition>] ) -> cString
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -88,25 +88,25 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
POSINS() is compatible with CT3's POSINS().
|
||||
PosIns() is compatible with CT3's PosIns().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
POSCHAR,POSDEL(),POSREPL()
|
||||
POSCHAR,PosDel(),PosRepl()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
POSREPL()
|
||||
PosRepl()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Replace characters at a certain position within a string
|
||||
$SYNTAX$
|
||||
POSREPL( <[@]cString>, <cReplacement>, [<nStartPosition>] ) -> cString
|
||||
PosRepl( <[@]cString>, <cReplacement>, [<nStartPosition>] ) -> cString
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -120,12 +120,12 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
POSREPL() is compatible with CT3's POSREPL().
|
||||
PosRepl() is compatible with CT3's PosRepl().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
POSCHAR(),POSDEL(),POSINS(),CSETREF()
|
||||
PosChar(),PosDel(),PosIns(),CSetRef()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
POSDIFF()
|
||||
PosDiff()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
The left-most position there two string differ
|
||||
$SYNTAX$
|
||||
POSDIFF( <cString1>, <cString2>, [<nIgnore>] ) -> nPosition
|
||||
PosDiff( <cString1>, <cString2>, [<nIgnore>] ) -> nPosition
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -24,25 +24,25 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
POSDIFF() is compatible with CT3's POSDIFF().
|
||||
PosDiff() is compatible with CT3's PosDiff().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
POSEQUAL()
|
||||
PosEqual()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
POSEQUAL()
|
||||
PosEqual()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
The left-most position there two string begin to be equal
|
||||
$SYNTAX$
|
||||
POSEQUAL( <cString1>, <cString2>, [<nCompare>], [<nIgnore>] ) -> nPosition
|
||||
PosEqual( <cString1>, <cString2>, [<nCompare>], [<nIgnore>] ) -> nPosition
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -56,12 +56,12 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
POSEQUAL() is compatible with CT3's POSEQUAL().
|
||||
PosEqual() is compatible with CT3's PosEqual().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
POSDIFF()
|
||||
PosDiff()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
PRINTSTAT()
|
||||
PrintStat()
|
||||
$CATEGORY$
|
||||
CT3 printer functions
|
||||
$ONELINER$
|
||||
|
||||
$SYNTAX$
|
||||
PRINTSTAT( [<nPrinter>] ) -> nState
|
||||
PrintStat( [<nPrinter>] ) -> nState
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -36,13 +36,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
PRINTREADY()
|
||||
PrintReady()
|
||||
$CATEGORY$
|
||||
CT3 printer functions
|
||||
$ONELINER$
|
||||
|
||||
$SYNTAX$
|
||||
PRINTREADY( [<nPrinter>] ) -> lPrinterReady
|
||||
PrintReady( [<nPrinter>] ) -> lPrinterReady
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
RANGEREM()
|
||||
RangeRem()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Remove characters within a certain ASCII range from a string
|
||||
$SYNTAX$
|
||||
RANGEREM( <cChar1|nChar1>, <cChar2|nChar2>, <cString> ) -> cString
|
||||
RangeRem( <cChar1|nChar1>, <cChar2|nChar2>, <cString> ) -> cString
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -18,24 +18,24 @@
|
||||
$DESCRIPTION$
|
||||
TODO: add documentation
|
||||
$EXAMPLES$
|
||||
? rangerem( "0", "9", "year2002.dbf" ) // "year.dbf", remove all digits
|
||||
? rangerem( "9", "0", "year2002.dbf" ) // "22", testing removal from "9" to Chr(255)
|
||||
? RangeRem( "0", "9", "year2002.dbf" ) // "year.dbf", remove all digits
|
||||
? RangeRem( "9", "0", "year2002.dbf" ) // "22", testing removal from "9" to Chr(255)
|
||||
// and from Chr(0) to "0"
|
||||
? rangerem( "0", "9", "yearcurr.dbf" ) // "yearcurr.dbf", test leaving string untouched
|
||||
? RangeRem( "0", "9", "yearcurr.dbf" ) // "yearcurr.dbf", test leaving string untouched
|
||||
$TESTS$
|
||||
rangerem( "0", "9", "year2002.dbf" ) == "year.dbf"
|
||||
rangerem( "9", "0", "year2002.dbf" ) == "22"
|
||||
rangerem( "0", "9", "yearcurr.dbf" ) == "yearcurr.dbf"
|
||||
RangeRem( "0", "9", "year2002.dbf" ) == "year.dbf"
|
||||
RangeRem( "9", "0", "year2002.dbf" ) == "22"
|
||||
RangeRem( "0", "9", "yearcurr.dbf" ) == "yearcurr.dbf"
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
RANGEREM() is compatible with CT3's RANGEREM().
|
||||
RangeRem() is compatible with CT3's RangeRem().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
RANGEREPL()
|
||||
RangeRepl()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
$ONELINER$
|
||||
Replace characters within a certain ASCII range from a string
|
||||
$SYNTAX$
|
||||
RANGEREPL( <cChar1|nChar1>, <cChar2|nChar2>,
|
||||
RangeRepl( <cChar1|nChar1>, <cChar2|nChar2>,
|
||||
<[@]cString>, <cReplacementChar|nReplacementChar> ) -> cString
|
||||
$ARGUMENTS$
|
||||
|
||||
@@ -56,23 +56,23 @@
|
||||
$DESCRIPTION$
|
||||
TODO: add documentation
|
||||
$EXAMPLES$
|
||||
? rangerepl( "0", "9", "year2002.dbf", "?" ) // "year????.dbf", replace all digits
|
||||
? rangerepl( "9", "0", "year2002.dbf", "?" ) // "????2??2????", testing replacement from "9" to Chr(255)
|
||||
? RangeRepl( "0", "9", "year2002.dbf", "?" ) // "year????.dbf", replace all digits
|
||||
? RangeRepl( "9", "0", "year2002.dbf", "?" ) // "????2??2????", testing replacement from "9" to Chr(255)
|
||||
// and from Chr(0) to "0"
|
||||
? rangerepl( "0", "9", "yearcurr.dbf", "?" ) // "yearcurr.dbf", test leaving string untouched
|
||||
? RangeRepl( "0", "9", "yearcurr.dbf", "?" ) // "yearcurr.dbf", test leaving string untouched
|
||||
$TESTS$
|
||||
rangerepl( "0", "9", "year2002.dbf", "?" ) == "year????.dbf"
|
||||
rangerepl( "9", "0", "year2002.dbf", "?" ) == "????2??2????"
|
||||
rangerepl( "0", "9", "yearcurr.dbf", "?" ) == "yearcurr.dbf"
|
||||
RangeRepl( "0", "9", "year2002.dbf", "?" ) == "year????.dbf"
|
||||
RangeRepl( "9", "0", "year2002.dbf", "?" ) == "????2??2????"
|
||||
RangeRepl( "0", "9", "yearcurr.dbf", "?" ) == "yearcurr.dbf"
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
RANGEREPL() is compatible with CT3's RANGEREPL().
|
||||
RangeRepl() is compatible with CT3's RangeRepl().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
RANGEREM()
|
||||
RangeRem()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CHARRELA()
|
||||
CharRelA()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Character relation of two strings
|
||||
$SYNTAX$
|
||||
CHARRELA( <cStringToMatch1>, <cString1>,
|
||||
CharRelA( <cStringToMatch1>, <cString1>,
|
||||
<cStringToMatch2>, <cString2> ) -> nPosition
|
||||
$ARGUMENTS$
|
||||
|
||||
@@ -25,25 +25,25 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
CHARRELA() is compatible with CT3's CHARRELA().
|
||||
CharRelA() is compatible with CT3's CharRelA().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CHARRELREP()
|
||||
CharRelRep()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CHARRELREP()
|
||||
CharRelRep()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Relation dependant character replacement
|
||||
$SYNTAX$
|
||||
CHARRELREP( <cStringToMatch1>, <cString1>,
|
||||
CharRelRep( <cStringToMatch1>, <cString1>,
|
||||
<cStringToMatch2>, <[@]cString2>,
|
||||
<cReplacement> ) -> cString
|
||||
$ARGUMENTS$
|
||||
@@ -59,12 +59,12 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
CHARRELREP() is compatible with CT3's CHARRELREP().
|
||||
CharRelRep() is compatible with CT3's CharRelRep().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CHARRELA(),CSETREF()
|
||||
CharRelA(),CSetRef()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
REMALL()
|
||||
RemAll()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Remove certain characters at the left and right of a string
|
||||
$SYNTAX$
|
||||
REMALL( <cString>, [<cSearch|nSearch>] ) -> cString
|
||||
RemAll( <cString>, [<cSearch|nSearch>] ) -> cString
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -24,25 +24,25 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
REMALL() is compatible with CT3's REMALL().
|
||||
RemAll() is compatible with CT3's RemAll().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
REMLEFT(),REMRIGHT()
|
||||
RemLeft(),RemRight()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
REMLEFT()
|
||||
RemLeft()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Remove certain characters at the left of a string
|
||||
$SYNTAX$
|
||||
REMLEFT( <cString>, [<cSearch|nSearch>] ) -> cString
|
||||
RemLeft( <cString>, [<cSearch|nSearch>] ) -> cString
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -56,25 +56,25 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
REMLEFT() is compatible with CT3's REMLEFT().
|
||||
RemLeft() is compatible with CT3's RemLeft().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
REMALL(),REMRIGHT()
|
||||
RemAll(),RemRight()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
REMRIGHT()
|
||||
RemRight()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Remove certain characters at the right of a string
|
||||
$SYNTAX$
|
||||
REMRIGHT( <cString>, [<cSearch|nSearch>] ) -> cString
|
||||
RemRight( <cString>, [<cSearch|nSearch>] ) -> cString
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -88,12 +88,12 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
REMRIGHT() is compatible with CT3's REMRIGHT().
|
||||
RemRight() is compatible with CT3's RemRight().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
REMALL(),REMLEFT()
|
||||
RemAll(),RemLeft()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
REPLALL()
|
||||
ReplAll()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Replace certain characters at the left and right of a string
|
||||
$SYNTAX$
|
||||
REPLALL( <cString>, <cReplace|nReplace>, [<cSearch|nSearch>] ) -> cString
|
||||
ReplAll( <cString>, <cReplace|nReplace>, [<cSearch|nSearch>] ) -> cString
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -24,25 +24,25 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
REPLALL() is compatible with CT3's REPLALL().
|
||||
ReplAll() is compatible with CT3's ReplAll().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
REPLLEFT(),REPLRIGHT()
|
||||
ReplLeft(),ReplRight()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
REPLLEFT()
|
||||
ReplLeft()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Replace certain characters at the left of a string
|
||||
$SYNTAX$
|
||||
REPLLEFT( <cString>, <cReplace|nReplace>, [<cSearch|nSearch>] ) -> cString
|
||||
ReplLeft( <cString>, <cReplace|nReplace>, [<cSearch|nSearch>] ) -> cString
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -56,25 +56,25 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
REPLLEFT() is compatible with CT3's REPLLEFT().
|
||||
ReplLeft() is compatible with CT3's ReplLeft().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
REPLALL(),REPLRIGHT()
|
||||
ReplAll(),ReplRight()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
REPLRIGHT()
|
||||
ReplRight()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Replace certain characters at the right of a string
|
||||
$SYNTAX$
|
||||
REPLRIGHT( <cString>, <cReplace|nReplace>, [<cSearch|nSearch>] ) -> cString
|
||||
ReplRight( <cString>, <cReplace|nReplace>, [<cSearch|nSearch>] ) -> cString
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -88,12 +88,12 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
REPLRIGHT() is compatible with CT3's REPLRIGHT().
|
||||
ReplRight() is compatible with CT3's ReplRight().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
REPLALL(),REPLLEFT()
|
||||
ReplAll(),ReplLeft()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
SCREENATTR()
|
||||
ScreenAttr()
|
||||
$CATEGORY$
|
||||
CT3 video functions
|
||||
$ONELINER$
|
||||
|
||||
$SYNTAX$
|
||||
SCREENATTR( [<nRow>],[<nColumn>] ) -> <nAttr>
|
||||
ScreenAttr( [<nRow>],[<nColumn>] ) -> <nAttr>
|
||||
$ARGUMENTS$
|
||||
<nRow> Designates the line from which to determine the attribute.
|
||||
The default is the cursor line.
|
||||
@@ -19,12 +19,12 @@
|
||||
attribute. The default is the cursor column.
|
||||
|
||||
$RETURNS$
|
||||
SCREENATTR() returns the attribute at the designated position.
|
||||
ScreenAttr() returns the attribute at the designated position.
|
||||
|
||||
$DESCRIPTION$
|
||||
SCREENATTR() returns the current screen attribute at <nRow> and
|
||||
ScreenAttr() returns the current screen attribute at <nRow> and
|
||||
<nColumn>. You can query targeted attributes this way and save them
|
||||
to use later, or process them later with INVERTATTR().
|
||||
to use later, or process them later with InvertAttr().
|
||||
|
||||
TODO: add documentation
|
||||
$EXAMPLES$
|
||||
@@ -46,13 +46,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
SCREENMIX()
|
||||
ScreenMix()
|
||||
$CATEGORY$
|
||||
CT3 video functions
|
||||
$ONELINER$
|
||||
|
||||
$SYNTAX$
|
||||
SCREENMIX( <cCharString>, <cAttributeString>, [<nRow>], [<nCol>] ) -> <cEmptyString>
|
||||
ScreenMix( <cCharString>, <cAttributeString>, [<nRow>], [<nCol>] ) -> <cEmptyString>
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -78,13 +78,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
SAYSCREEN()
|
||||
SayScreen()
|
||||
$CATEGORY$
|
||||
CT3 video functions
|
||||
$ONELINER$
|
||||
|
||||
$SYNTAX$
|
||||
SAYSCREEN( <cString>, [<nRow>], [<nCol>] ) -> <cEmptyString>
|
||||
SayScreen( <cString>, [<nRow>], [<nCol>] ) -> <cEmptyString>
|
||||
$ARGUMENTS$
|
||||
<cString> - the string to output. Although undocumented, can be NIL.
|
||||
<nRow> - row number, defaults to cursor row.
|
||||
@@ -107,13 +107,13 @@
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
SCREENMIX()
|
||||
ScreenMix()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
INVERTWIN()
|
||||
InvertWin()
|
||||
$CATEGORY$
|
||||
CT3 video functions
|
||||
$ONELINER$
|
||||
@@ -133,7 +133,7 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
INVERTWIN() is compatible with CT3's INVERTWIN().
|
||||
InvertWin() is compatible with CT3's InvertWin().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
@@ -145,13 +145,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
UNTEXTWIN()
|
||||
UnTextWin()
|
||||
$CATEGORY$
|
||||
CT3 video functions
|
||||
$ONELINER$
|
||||
|
||||
$SYNTAX$
|
||||
UNTEXTWIN( <nTopLine>, <nLeftColumn>, <nBottomLine>, <nRightColumn>,
|
||||
UnTextWin( <nTopLine>, <nLeftColumn>, <nBottomLine>, <nRightColumn>,
|
||||
<cReplacementCharacter|nReplacementCharacter>,
|
||||
[<cInitialCharacter|nInitialCharacter>],
|
||||
[<cEndCharacter|nEndCharacter>] ) --> cNull
|
||||
@@ -198,13 +198,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CHARWIN()
|
||||
CharWin()
|
||||
$CATEGORY$
|
||||
CT3 video functions
|
||||
$ONELINER$
|
||||
|
||||
$SYNTAX$
|
||||
CHARWIN( <nTop>, <nLeft>, <nBottom>, <nRight>, [<cNewChar|nNewChar>],
|
||||
CharWin( <nTop>, <nLeft>, <nBottom>, <nRight>, [<cNewChar|nNewChar>],
|
||||
[<cOldChar|nOldChar>] ) --> <cEmptyString>
|
||||
$ARGUMENTS$
|
||||
<nTop> - top row number, default 0
|
||||
@@ -241,13 +241,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
COLORWIN()
|
||||
ColorWin()
|
||||
$CATEGORY$
|
||||
CT3 video functions
|
||||
$ONELINER$
|
||||
|
||||
$SYNTAX$
|
||||
COLORWIN( [<nTopLine>], [<nLeftCol>], [<nBottomLine>], [<nRightCol>],
|
||||
ColorWin( [<nTopLine>], [<nLeftCol>], [<nBottomLine>], [<nRightCol>],
|
||||
[<cNewAttr|nNewAttr>], [<cOldAttr|nOldAttr>] ) --> cNull
|
||||
$ARGUMENTS$
|
||||
<nTopLine> Designates the topmost line to begin processing. The
|
||||
@@ -286,13 +286,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
SCREENTEXT()
|
||||
ScreenText()
|
||||
$CATEGORY$
|
||||
CT video functions (Harbour extension)
|
||||
$ONELINER$
|
||||
|
||||
$SYNTAX$
|
||||
SCREENTEXT( <nTop>, <nLeft>, <nBottom>, <nRight> )
|
||||
ScreenText( <nTop>, <nLeft>, <nBottom>, <nRight> )
|
||||
$ARGUMENTS$
|
||||
<nTop> - top row number, default 0
|
||||
<nLeft> - left column number, default 0
|
||||
@@ -322,13 +322,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
COLORREPL()
|
||||
ColorRepl()
|
||||
$CATEGORY$
|
||||
CT3 video functions
|
||||
$ONELINER$
|
||||
|
||||
$SYNTAX$
|
||||
COLORREPL( [<cNewAttr|nNewAttr>], [<cOldAttr|nOldAttr>] ) --> cNull
|
||||
ColorRepl( [<cNewAttr|nNewAttr>], [<cOldAttr|nOldAttr>] ) --> cNull
|
||||
$ARGUMENTS$
|
||||
<cNewAttr|nNewAttr> Designates the new attribute. The default is
|
||||
CLEARA.
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
STRDIFF()
|
||||
StrDiff()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Evaluate the "Edit (Levensthein) Distance" of two strings
|
||||
$SYNTAX$
|
||||
STRDIFF( <cString1>, <cString2>, [<nReplacementPenalty>], [<nDeletionPenalty>],
|
||||
StrDiff( <cString1>, <cString2>, [<nReplacementPenalty>], [<nDeletionPenalty>],
|
||||
[<nInsertionPenalty>] ) -> <nDistance>
|
||||
$ARGUMENTS$
|
||||
<cString1> string at the "starting point" of the transformation process, default is ""
|
||||
@@ -21,51 +21,51 @@
|
||||
$RETURNS$
|
||||
<nDistance> penalty point sum of all operations needed to transform <cString1> to <cString2>
|
||||
$DESCRIPTION$
|
||||
The STRDIFF() functions calculates the so called "Edit" or "Levensthein" distance of two strings.
|
||||
The StrDiff() functions calculates the so called "Edit" or "Levensthein" distance of two strings.
|
||||
This distance is a measure for the number of single character replace/insert/delete operations (so called
|
||||
"point mutations") required to transform <cString1> into <cString2> and its value will be the smallest sum of
|
||||
the penalty points of the required operations.
|
||||
|
||||
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
|
||||
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
|
||||
(len(cString1)+1)*(len(cString2)+1)*sizeof(int) <= UINT_MAX, although allocing UINT_MAX bytes will not
|
||||
(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.
|
||||
|
||||
Also, be aware that there can be an overflow when the penalty points are summed up: Assuming that the
|
||||
number of transformation operations is in the order of max(len(cString1),len(cString2)), the penalty point
|
||||
number of transformation operations is in the order of Max(Len(cString1),Len(cString2)), the penalty point
|
||||
sum, that is internally stored in an "int" variable, is in the order of
|
||||
(max(len(cString1),len(cString2))*max(nReplacementPenalty,nDeletionPenalty,nInsertionPentaly).
|
||||
The STRDIFF() does not do an overflow check due to time performance reasons. Future versions of STRDIFF()
|
||||
(Max(Len(cString1),Len(cString2))*Max(nReplacementPenalty,nDeletionPenalty,nInsertionPentaly).
|
||||
The StrDiff() does not do an overflow check due to time performance reasons. Future versions of StrDiff()
|
||||
could use a type different to "int" to store the penalty point sum to save memory or to avoid overflows.
|
||||
|
||||
The function is aware of the settings done by SETATLIKE(), that means that the wildchar character
|
||||
The function is aware of the settings done by SetAtLike(), that means that the wildchar character
|
||||
is considered equal to ALL characters.
|
||||
|
||||
$EXAMPLES$
|
||||
? strdiff( "ABC", "ADC" ) // 3, one character replaced
|
||||
? strdiff( "ABC", "AEC" ) // 3, dito
|
||||
? strdiff( "CBA", "ABC" ) // 6, two characters replaced
|
||||
? strdiff( "ABC", "AXBC" ) // 1, one character inserted
|
||||
? strdiff( "AXBC", "ABC" ) // 6, one character removed
|
||||
? strdiff( "AXBC", "ADC" ) // 9, one character removed and one replaced
|
||||
? StrDiff( "ABC", "ADC" ) // 3, one character replaced
|
||||
? StrDiff( "ABC", "AEC" ) // 3, dito
|
||||
? StrDiff( "CBA", "ABC" ) // 6, two characters replaced
|
||||
? StrDiff( "ABC", "AXBC" ) // 1, one character inserted
|
||||
? StrDiff( "AXBC", "ABC" ) // 6, one character removed
|
||||
? StrDiff( "AXBC", "ADC" ) // 9, one character removed and one replaced
|
||||
$TESTS$
|
||||
strdiff( "ABC", "ADC" ) == 3
|
||||
strdiff( "ABC", "AEC" ) == 3
|
||||
strdiff( "CBA", "ABC" ) == 6
|
||||
strdiff( "ABC", "AXBC" ) == 1
|
||||
strdiff( "AXBC", "ABC" ) == 6
|
||||
strdiff( "AXBC", "ADC" ) == 9
|
||||
StrDiff( "ABC", "ADC" ) == 3
|
||||
StrDiff( "ABC", "AEC" ) == 3
|
||||
StrDiff( "CBA", "ABC" ) == 6
|
||||
StrDiff( "ABC", "AXBC" ) == 1
|
||||
StrDiff( "AXBC", "ABC" ) == 6
|
||||
StrDiff( "AXBC", "ADC" ) == 9
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
STRDIFF() is compatible with CT3's STRDIFF().
|
||||
StrDiff() is compatible with CT3's StrDiff().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
SETATLIKE()
|
||||
SetAtLike()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
STRSWAP()
|
||||
StrSwap()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Swap the contents of two strings
|
||||
$SYNTAX$
|
||||
STRSWAP( <[@]cString1>, <[@]cString2> ) -> cString
|
||||
StrSwap( <[@]cString1>, <[@]cString2> ) -> cString
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -24,7 +24,7 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
STRSWAP() is compatible with CT3's STRSWAP().
|
||||
StrSwap() is compatible with CT3's StrSwap().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
TABEXPAND()
|
||||
TabExpand()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
@@ -22,7 +22,7 @@
|
||||
hb_eol()
|
||||
<cTabChar|nTabChar> character indicating a tab stop,
|
||||
default is Chr(9)
|
||||
<lIgnore141> .T., if the soft-CR used by MEMOEDIT()
|
||||
<lIgnore141> .T., if the soft-CR used by MemoEdit()
|
||||
should be ignored as a newline indicator,
|
||||
default is .F. (functions uses Chr(141))
|
||||
$RETURNS$
|
||||
@@ -32,17 +32,17 @@
|
||||
$EXAMPLES$
|
||||
|
||||
$TESTS$
|
||||
tabexpand( "-" + Chr( 9 ) + "!" ) == "- !"
|
||||
tabexpand( "----" + Chr( 9 ) + "!" ) == "---- !"
|
||||
tabexpand( "-" + Chr( 9 ) + "!", , "+" ) == "-+++++++!"
|
||||
tabexpand( "-" + Chr( 9 ) + "!", 4 ) == "- !"
|
||||
tabexpand( "----" + Chr( 9 ) + "!", 8 ) == "---- !"
|
||||
tabexpand( "----" + Chr( 9 ) + "!", 8, "+" ) == "----++++!"
|
||||
tabexpand( "-" + Chr( 9 ) + "!" + hb_eol() + "----" + Chr( 9 ) + "!", , "+" ) == "-+++++++!" + hb_eol() + "----++++!"
|
||||
TabExpand( "-" + Chr( 9 ) + "!" ) == "- !"
|
||||
TabExpand( "----" + Chr( 9 ) + "!" ) == "---- !"
|
||||
TabExpand( "-" + Chr( 9 ) + "!", , "+" ) == "-+++++++!"
|
||||
TabExpand( "-" + Chr( 9 ) + "!", 4 ) == "- !"
|
||||
TabExpand( "----" + Chr( 9 ) + "!", 8 ) == "---- !"
|
||||
TabExpand( "----" + Chr( 9 ) + "!", 8, "+" ) == "----++++!"
|
||||
TabExpand( "-" + Chr( 9 ) + "!" + hb_eol() + "----" + Chr( 9 ) + "!", , "+" ) == "-+++++++!" + hb_eol() + "----++++!"
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
TABEXPAND() is compatible with CT3's TABEXPAND(), but there are
|
||||
TabExpand() is compatible with CT3's TabExpand(), but there are
|
||||
three new parameters for a better fine control of the function's
|
||||
behaviour.
|
||||
$PLATFORMS$
|
||||
@@ -50,19 +50,19 @@
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
TABPACK()
|
||||
TabPack()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
TABPACK()
|
||||
TabPack()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Pack fill characters to appropriate tab characters
|
||||
$SYNTAX$
|
||||
TABPACK( <cString>, [<nTabWidth>], [<cFillChar|nFillChar>],
|
||||
TabPack( <cString>, [<nTabWidth>], [<cFillChar|nFillChar>],
|
||||
[<cNewLineCharacters>], [<cTabChar|nTabChar>],
|
||||
[<lIgnore141>] ) -> cPackedString
|
||||
$ARGUMENTS$
|
||||
@@ -74,7 +74,7 @@
|
||||
hb_eol()
|
||||
<cTabChar|nTabChar> character indicating a tab stop,
|
||||
default is Chr(9)
|
||||
<lIgnore141> .T., if the soft-CR used by MEMOEDIT()
|
||||
<lIgnore141> .T., if the soft-CR used by MemoEdit()
|
||||
should be ignored as a newline indicator,
|
||||
default is .F. (functions uses Chr(141))
|
||||
$RETURNS$
|
||||
@@ -88,7 +88,7 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
TABPACK() is compatible with CT3's TABPACK(), but there are
|
||||
TabPack() is compatible with CT3's TabPack(), but there are
|
||||
three new parameters for a better fine control of the function's
|
||||
behaviour.
|
||||
$PLATFORMS$
|
||||
@@ -96,6 +96,6 @@
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
TABEXPAND()
|
||||
TabExpand()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
ATTOKEN()
|
||||
AtToken()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Position of a token in a string
|
||||
$SYNTAX$
|
||||
ATTOKEN( <cString>, [<cTokenizer>],
|
||||
AtToken( <cString>, [<cTokenizer>],
|
||||
[<nTokenCount>], [<nSkipWidth>] ) -> nPosition
|
||||
$ARGUMENTS$
|
||||
<cString> is the processed string
|
||||
@@ -33,46 +33,46 @@
|
||||
<nPosition> The start position of the specified token or
|
||||
0 if such a token does not exist in <cString>.
|
||||
$DESCRIPTION$
|
||||
The ATTOKEN() function calculates the start position of tne
|
||||
The AtToken() function calculates the start position of tne
|
||||
<nTokenCount>th token in <cString>. By setting the new <nSkipWidth>
|
||||
parameter to a value different than 0, you can specify how many tokenizing
|
||||
characters are combined at most to one token stop. Be aware that
|
||||
this can result to empty tokens there the start position is not
|
||||
defined clearly. Then, ATTOKEN() returns the position there the
|
||||
defined clearly. Then, AtToken() returns the position there the
|
||||
token WOULD start if its length is larger than 0. To check for
|
||||
empty tokens, simply look if the character at the returned position
|
||||
is within the tokenizer list.
|
||||
$EXAMPLES$
|
||||
attoken( "Hello, World!" ) // --> 8 (empty strings after tokenizer are not a token !)
|
||||
AtToken( "Hello, World!" ) // --> 8 (empty strings after tokenizer are not a token !)
|
||||
$TESTS$
|
||||
attoken( "Hello, World!" ) == 8
|
||||
attoken( "Hello, World!",, 2 ) == 8
|
||||
attoken( "Hello, World!",, 2, 1 ) == 7
|
||||
attoken( "Hello, World!", " ", 2, 1 ) == 8
|
||||
AtToken( "Hello, World!" ) == 8
|
||||
AtToken( "Hello, World!",, 2 ) == 8
|
||||
AtToken( "Hello, World!",, 2, 1 ) == 7
|
||||
AtToken( "Hello, World!", " ", 2, 1 ) == 8
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
ATTOKEN() is compatible with CT3's ATTOKEN, but has an additional
|
||||
AtToken() is compatible with CT3's ATTOKEN, but has an additional
|
||||
4th parameter to let you specify a skip width equal to that in the
|
||||
TOKEN() function.
|
||||
Token() function.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
TOKEN(),NUMTOKEN(),TOKENLOWER(),TOKENUPPER(),TOKENSEP()
|
||||
Token(),NUMToken(),TokenLower(),TokenUpper(),TokenSep()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
TOKEN()
|
||||
Token()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Tokens of a string
|
||||
$SYNTAX$
|
||||
TOKEN( <cString>, [<cTokenizer>],
|
||||
Token( <cString>, [<cTokenizer>],
|
||||
[<nTokenCount], [<nSkipWidth>],
|
||||
[<@cPreTokenSep>], [<@cPostTokenSep>] ) -> cToken
|
||||
$ARGUMENTS$
|
||||
@@ -99,49 +99,49 @@
|
||||
$RETURNS$
|
||||
<cToken> the token specified by the parameters given above
|
||||
$DESCRIPTION$
|
||||
The TOKEN() function extracts the <nTokenCount>th token from the
|
||||
The Token() function extracts the <nTokenCount>th token from the
|
||||
string <cString>. In the course of this, the tokens in the
|
||||
string are separated by the character(s) specified in <cTokenizer>.
|
||||
The function may also extract empty tokens, if you specify a skip
|
||||
width other than zero.
|
||||
Be aware of the new 5th and 6th parameter there the TOKEN() function
|
||||
Be aware of the new 5th and 6th parameter there the Token() function
|
||||
stores the tokenizing character before and after the extracted token.
|
||||
Therefore, additional calls to the TOKENSEP() function are not
|
||||
Therefore, additional calls to the TokenSep() function are not
|
||||
necessary.
|
||||
$EXAMPLES$
|
||||
? token( "Hello, World!" ) --> "World"
|
||||
? token( "Hello, World!",, 2, 1 ) --> ""
|
||||
? token( "Hello, World!", ",", 2, 1 ) --> " World!"
|
||||
? token( "Hello, World!", " ", 2, 1 ) --> "World!"
|
||||
? Token( "Hello, World!" ) --> "World"
|
||||
? Token( "Hello, World!",, 2, 1 ) --> ""
|
||||
? Token( "Hello, World!", ",", 2, 1 ) --> " World!"
|
||||
? Token( "Hello, World!", " ", 2, 1 ) --> "World!"
|
||||
$TESTS$
|
||||
token( "Hello, World!" ) == "World"
|
||||
token( "Hello, World!",, 2, 1 ) == ""
|
||||
token( "Hello, World!", ",", 2, 1 ) == " World!"
|
||||
token( "Hello, World!", " ", 2, 1 ) == "World!"
|
||||
Token( "Hello, World!" ) == "World"
|
||||
Token( "Hello, World!",, 2, 1 ) == ""
|
||||
Token( "Hello, World!", ",", 2, 1 ) == " World!"
|
||||
Token( "Hello, World!", " ", 2, 1 ) == "World!"
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
TOKEN() is compatible with CT3's TOKEN, but two additional
|
||||
parameters have been added there the TOKEN() function can store
|
||||
Token() is compatible with CT3's TOKEN, but two additional
|
||||
parameters have been added there the Token() function can store
|
||||
the tokenizers before and after the current token.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
NUMTOKEN(),ATTOKEN(),TOKENLOWER(),TOKENUPPER(),TOKENSEP()
|
||||
NUMToken(),AtToken(),TokenLower(),TokenUpper(),TokenSep()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
NUMTOKEN()
|
||||
NUMToken()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Retrieves the number of tokens in a string
|
||||
$SYNTAX$
|
||||
NUMTOKEN( <cString>, [<cTokenizer>], [<nSkipWidth>] ) -> nTokenCount
|
||||
NUMToken( <cString>, [<cTokenizer>], [<nSkipWidth>] ) -> nTokenCount
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -151,31 +151,31 @@
|
||||
$EXAMPLES$
|
||||
|
||||
$TESTS$
|
||||
numtoken( "Hello, World!" ) == 2
|
||||
numtoken( "This is good. See you! How do you do?", ".!?" ) == 3
|
||||
numtoken( "one,,three,four,,six", ",", 1 ) == 6
|
||||
numToken( "Hello, World!" ) == 2
|
||||
numToken( "This is good. See you! How do you do?", ".!?" ) == 3
|
||||
numToken( "one,,three,four,,six", ",", 1 ) == 6
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
NUMTOKEN() is compatible with CT3's NUMTOKEN().
|
||||
NUMToken() is compatible with CT3's NUMToken().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
TOKEN(),ATTOKEN(),TOKENLOWER(),TOKENUPPER(),TOKENSEP()
|
||||
Token(),AtToken(),TokenLower(),TokenUpper(),TokenSep()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
TOKENLOWER()
|
||||
TokenLower()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Change the first letter of tokens to lower case
|
||||
$SYNTAX$
|
||||
TOKENLOWER( <[@]cString>, [<cTokenizer>], [<nTokenCount>],
|
||||
TokenLower( <[@]cString>, [<cTokenizer>], [<nTokenCount>],
|
||||
[<nSkipWidth>] ) -> cString
|
||||
$ARGUMENTS$
|
||||
<[@]cString> is the processed string
|
||||
@@ -197,27 +197,27 @@
|
||||
$RETURNS$
|
||||
<cString> the string with the lowercased tokens
|
||||
$DESCRIPTION$
|
||||
The TOKENLOWER() function changes the first letter of tokens in <cString>
|
||||
The TokenLower() function changes the first letter of tokens in <cString>
|
||||
to lower case. To do this, it uses the same tokenizing mechanism
|
||||
as the token() function. If TOKENLOWER() extracts a token that starts
|
||||
as the Token() function. If TokenLower() extracts a token that starts
|
||||
with a letter, this letter will be changed to lower case.
|
||||
You can omit the return value of this function by setting the CSETREF()
|
||||
You can omit the return value of this function by setting the CSetRef()
|
||||
switch to .T., but you must then pass <cString> by reference to get
|
||||
the result.
|
||||
$EXAMPLES$
|
||||
? tokenlower( "Hello, World, here I am!" ) // "hello, world, here i am!"
|
||||
? tokenlower( "Hello, World, here I am!",, 3 ) // "hello, world, here I am!"
|
||||
? tokenlower( "Hello, World, here I am!", ",", 3 ) // "hello, World, here I am!"
|
||||
? tokenlower( "Hello, World, here I am!", " W" ) // "hello, World, here i am!"
|
||||
? TokenLower( "Hello, World, here I am!" ) // "hello, world, here i am!"
|
||||
? TokenLower( "Hello, World, here I am!",, 3 ) // "hello, world, here I am!"
|
||||
? TokenLower( "Hello, World, here I am!", ",", 3 ) // "hello, World, here I am!"
|
||||
? TokenLower( "Hello, World, here I am!", " W" ) // "hello, World, here i am!"
|
||||
$TESTS$
|
||||
tokenlower( "Hello, World, here I am!" ) == "hello, world, here i am!"
|
||||
tokenlower( "Hello, World, here I am!",, 3 ) == "hello, world, here I am!"
|
||||
tokenlower( "Hello, World, here I am!", ",", 3 ) == "hello, World, here I am!"
|
||||
tokenlower( "Hello, World, here I am!", " W" ) == "hello, World, here i am!"
|
||||
TokenLower( "Hello, World, here I am!" ) == "hello, world, here i am!"
|
||||
TokenLower( "Hello, World, here I am!",, 3 ) == "hello, world, here I am!"
|
||||
TokenLower( "Hello, World, here I am!", ",", 3 ) == "hello, World, here I am!"
|
||||
TokenLower( "Hello, World, here I am!", " W" ) == "hello, World, here i am!"
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
TOKENLOWER() is compatible with CT3's TOKENLOWER(),
|
||||
TokenLower() is compatible with CT3's TokenLower(),
|
||||
but a new 4th parameter, <nSkipWidth> has been added for
|
||||
synchronization with the the other token functions.
|
||||
$PLATFORMS$
|
||||
@@ -225,19 +225,19 @@
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
TOKEN(),NUMTOKEN(),ATTOKEN(),TOKENUPPER(),TOKENSEP(),CSETREF()
|
||||
Token(),NUMToken(),AtToken(),TokenUpper(),TokenSep(),CSetRef()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
TOKENUPPER()
|
||||
TokenUpper()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Change the first letter of tokens to upper case
|
||||
$SYNTAX$
|
||||
TOKENUPPER( <[@]cString>, [<cTokenizer>], [<nTokenCount>],
|
||||
TokenUpper( <[@]cString>, [<cTokenizer>], [<nTokenCount>],
|
||||
[<nSkipWidth>] ) -> cString
|
||||
$ARGUMENTS$
|
||||
<[@]cString> is the processed string
|
||||
@@ -259,27 +259,27 @@
|
||||
$RETURNS$
|
||||
<cString> the string with the uppercased tokens
|
||||
$DESCRIPTION$
|
||||
The TOKENUPPER() function changes the first letter of tokens in <cString>
|
||||
The TokenUpper() function changes the first letter of tokens in <cString>
|
||||
to upper case. To do this, it uses the same tokenizing mechanism
|
||||
as the token() function. If TOKENUPPER() extracts a token that starts
|
||||
as the Token() function. If TokenUpper() extracts a token that starts
|
||||
with a letter, this letter will be changed to upper case.
|
||||
You can omit the return value of this function by setting the CSETREF()
|
||||
You can omit the return value of this function by setting the CSetRef()
|
||||
switch to .T., but you must then pass <cString> by reference to get
|
||||
the result.
|
||||
$EXAMPLES$
|
||||
? tokenupper( "Hello, world, here I am!" ) // "Hello, World, Here I Am!"
|
||||
? tokenupper( "Hello, world, here I am!",, 3 ) // "Hello, World, Here I am!"
|
||||
? tokenupper( "Hello, world, here I am!", ",", 3 ) // "Hello, world, here I am!"
|
||||
? tokenupper( "Hello, world, here I am!", " w" ) // "Hello, wOrld, Here I Am!"
|
||||
? TokenUpper( "Hello, world, here I am!" ) // "Hello, World, Here I Am!"
|
||||
? TokenUpper( "Hello, world, here I am!",, 3 ) // "Hello, World, Here I am!"
|
||||
? TokenUpper( "Hello, world, here I am!", ",", 3 ) // "Hello, world, here I am!"
|
||||
? TokenUpper( "Hello, world, here I am!", " w" ) // "Hello, wOrld, Here I Am!"
|
||||
$TESTS$
|
||||
tokenupper( "Hello, world, here I am!" ) == "Hello, World, Here I Am!"
|
||||
tokenupper( "Hello, world, here I am!",, 3 ) == "Hello, World, Here I am!"
|
||||
tokenupper( "Hello, world, here I am!", ",", 3 ) == "Hello, world, here I am!"
|
||||
tokenupper( "Hello, world, here I am!", " w" ) == "Hello, wOrld, Here I Am!"
|
||||
TokenUpper( "Hello, world, here I am!" ) == "Hello, World, Here I Am!"
|
||||
TokenUpper( "Hello, world, here I am!",, 3 ) == "Hello, World, Here I am!"
|
||||
TokenUpper( "Hello, world, here I am!", ",", 3 ) == "Hello, world, here I am!"
|
||||
TokenUpper( "Hello, world, here I am!", " w" ) == "Hello, wOrld, Here I Am!"
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
TOKENUPPER() is compatible with CT3's TOKENUPPER(),
|
||||
TokenUpper() is compatible with CT3's TokenUpper(),
|
||||
but a new 4th parameter, <nSkipWidth> has been added for
|
||||
synchronization with the the other token functions.
|
||||
$PLATFORMS$
|
||||
@@ -287,47 +287,47 @@
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
TOKEN(),NUMTOKEN(),ATTOKEN(),TOKENLOWER(),TOKENSEP(),CSETREF()
|
||||
Token(),NUMToken(),AtToken(),TokenLower(),TokenSep(),CSetRef()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
TOKENSEP()
|
||||
TokenSep()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Retrieves the token separators of the last token() call
|
||||
Retrieves the token separators of the last Token() call
|
||||
$SYNTAX$
|
||||
TOKENSEP( [<lMode>] ) -> cSeparator
|
||||
TokenSep( [<lMode>] ) -> cSeparator
|
||||
$ARGUMENTS$
|
||||
[<lMode>] if set to .T., the token separator BEHIND the token
|
||||
retrieved from the token() call will be returned.
|
||||
retrieved from the Token() call will be returned.
|
||||
Default: .F., returns the separator BEFORE the token
|
||||
$RETURNS$
|
||||
Depending on the setting of <lMode>, the separating character of the
|
||||
the token retrieved from the last token() call will be returned.
|
||||
These separating characters can now also be retrieved with the token()
|
||||
the token retrieved from the last Token() call will be returned.
|
||||
These separating characters can now also be retrieved with the Token()
|
||||
function.
|
||||
$DESCRIPTION$
|
||||
When one does extract tokens from a string with the token() function,
|
||||
When one does extract tokens from a string with the Token() function,
|
||||
one might be interested in the separator characters that have been
|
||||
used to extract a specific token. To get this information you can
|
||||
either use the TOKENSEP() function after each token() call, or
|
||||
use the new 5th and 6th parameter of the token() function.
|
||||
either use the TokenSep() function after each Token() call, or
|
||||
use the new 5th and 6th parameter of the Token() function.
|
||||
$EXAMPLES$
|
||||
see TOKEN() function
|
||||
see Token() function
|
||||
$TESTS$
|
||||
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
TOKENSEP() is compatible with CT3's TOKENSEP().
|
||||
TokenSep() is compatible with CT3's TokenSep().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
TOKEN(),NUMTOKEN(),ATTOKEN(),TOKENLOWER(),TOKENUPPER()
|
||||
Token(),NUMToken(),AtToken(),TokenLower(),TokenUpper()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
TOKENINIT()
|
||||
TokenInit()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Initializes a token environment
|
||||
$SYNTAX$
|
||||
TOKENINIT( <[@]cString>], [<cTokenizer>], [<nSkipWidth>],
|
||||
TokenInit( <[@]cString>], [<cTokenizer>], [<nSkipWidth>],
|
||||
[<@cTokenEnvironment>] ) -> lState
|
||||
$ARGUMENTS$
|
||||
<[@]cString> is the processed string
|
||||
@@ -30,15 +30,15 @@
|
||||
$RETURNS$
|
||||
<lState> success of the initialization
|
||||
$DESCRIPTION$
|
||||
The TOKENINIT() function initializes a token environment. A token
|
||||
The TokenInit() function initializes a token environment. A token
|
||||
environment is the information about how a string is to be tokenized.
|
||||
This information is created in the process of tokenization of the
|
||||
string <cString> - equal to the one used in the TOKEN() function
|
||||
string <cString> - equal to the one used in the Token() function
|
||||
with the help of the <cTokenizer> and <nSkipWidth> parameters.
|
||||
|
||||
This token environment can be very useful when large strings have
|
||||
to be tokenized since the tokenization has to take place only once
|
||||
whereas the TOKEN() function must always start the tokenizing process
|
||||
whereas the Token() function must always start the tokenizing process
|
||||
from scratch.
|
||||
|
||||
Unlike CTIII, this function provides two mechanisms of storing the
|
||||
@@ -49,52 +49,52 @@
|
||||
|
||||
Additionally, a counter is stored in the token environment, so that
|
||||
the tokens can successivly be obtained. This counter is first set to 1.
|
||||
When the TOKENINIT() function is called without a string a tokenize,
|
||||
When the TokenInit() function is called without a string a tokenize,
|
||||
the counter of either the global environment or the environment given
|
||||
by reference in the 4th parameter is rewind to 1.
|
||||
|
||||
Additionally, unlike CTIII, tokeninit() does not need the string
|
||||
Additionally, unlike CTIII, TokenInit() does not need the string
|
||||
<cString> to be passed by reference, since one must provide the
|
||||
string in calls to TOKENNEXT() again.
|
||||
string in calls to TokenNext() again.
|
||||
$EXAMPLES$
|
||||
tokeninit( cString ) // tokenize the string <cString> with default
|
||||
TokenInit( cString ) // tokenize the string <cString> with default
|
||||
// rules and store the token environment globally
|
||||
// and eventually delete an old global TE
|
||||
tokeninit( @cString ) // no difference in result, but eventually faster,
|
||||
TokenInit( @cString ) // no difference in result, but eventually faster,
|
||||
// since the string must not be copied
|
||||
tokeninit() // rewind counter of global TE to 1
|
||||
tokeninit( "1,2,3", "," , 1 ) // tokenize constant string, store in global TE
|
||||
tokeninit( cString, , 1, @cTE1 ) // tokenize cString and store TE in
|
||||
TokenInit() // rewind counter of global TE to 1
|
||||
TokenInit( "1,2,3", "," , 1 ) // tokenize constant string, store in global TE
|
||||
TokenInit( cString, , 1, @cTE1 ) // tokenize cString and store TE in
|
||||
// cTE1 only without overriding global TE
|
||||
tokeninit( cString, , 1, cTE1 ) // tokenize cString and store TE in
|
||||
TokenInit( cString, , 1, cTE1 ) // tokenize cString and store TE in
|
||||
// GLOBAL TE since 4th parameter is
|
||||
// not given by reference !!!
|
||||
tokeninit( ,,, @cTE1 ) // set counter in TE stored in cTE1 to 1
|
||||
TokenInit( ,,, @cTE1 ) // set counter in TE stored in cTE1 to 1
|
||||
$TESTS$
|
||||
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
TOKENINIT() is compatible with CTIII's TOKENINIT(),
|
||||
TokenInit() is compatible with CTIII's TokenInit(),
|
||||
but there is an additional parameter featuring local token environments.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
TOKEN(),TOKENEXIT(),TOKENNEXT(),TOKENNUM(),TOKENAT(),SAVETOKEN(),RESTTOKEN(),TOKENEND()
|
||||
Token(),TokenExit(),TokenNext(),TokenNum(),TokenAt(),SAVEToken(),RESTToken(),TokenEnd()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
TOKENNEXT()
|
||||
TokenNext()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Successivly obtains tokens from a string
|
||||
$SYNTAX$
|
||||
TOKENNEXT( <[@]cString>, [<nToken>],
|
||||
TokenNext( <[@]cString>, [<nToken>],
|
||||
[<@cTokenEnvironment>] ) -> cToken
|
||||
$ARGUMENTS$
|
||||
<[@]cString> the processed string
|
||||
@@ -103,37 +103,37 @@
|
||||
$RETURNS$
|
||||
<cToken> a token from <cString>
|
||||
$DESCRIPTION$
|
||||
With TOKENNEXT(), the tokens determined with the TOKENINIT() functions
|
||||
can be retrieved. To do this, TOKENNEXT() uses the information stored
|
||||
With TokenNext(), the tokens determined with the TokenInit() functions
|
||||
can be retrieved. To do this, TokenNext() uses the information stored
|
||||
in either the global token environment or the local one supplied by
|
||||
<cTokenEnvironment>. Note that, is supplied, this 3rd parameter has
|
||||
always to be passed by reference.
|
||||
|
||||
If the 2nd parameter, <nToken> is given, TOKENNEXT() simply returns
|
||||
If the 2nd parameter, <nToken> is given, TokenNext() simply returns
|
||||
the <nToken>th token without manipulating the TE counter. Otherwise
|
||||
the token pointed to by the TE counter is returned and the counter
|
||||
is incremented by one. Like this, a simple loop with TOKENEND() can
|
||||
is incremented by one. Like this, a simple loop with TokenEnd() can
|
||||
be used to retrieve all tokens of a string successivly.
|
||||
|
||||
Note that <cString> does not have to be the same used in TOKENINIT(),
|
||||
Note that <cString> does not have to be the same used in TokenInit(),
|
||||
so that one can do a "correlational tokenization", i.e. tokenize a string
|
||||
as if it was another! E.G. using TOKENINIT() with the string
|
||||
"AA,BBB" but calling TOKENNEXT() with "CCCEE" would
|
||||
as if it was another! E.G. using TokenInit() with the string
|
||||
"AA,BBB" but calling TokenNext() with "CCCEE" would
|
||||
give first "CC" and then "EE" (because "CCCEE" is not long enough).
|
||||
$EXAMPLES$
|
||||
// default behavhiour
|
||||
tokeninit( cString ) // initialize a TE
|
||||
DO WHILE ! tokenend()
|
||||
? tokennext( cString ) // get all tokens successivly
|
||||
TokenInit( cString ) // initialize a TE
|
||||
DO WHILE ! TokenEnd()
|
||||
? TokenNext( cString ) // get all tokens successivly
|
||||
ENDDO
|
||||
? tokennext( cString, 3 ) // get the 3rd token, counter will remain the same
|
||||
tokenexit() // free the memory used for the global TE
|
||||
? TokenNext( cString, 3 ) // get the 3rd token, counter will remain the same
|
||||
TokenExit() // free the memory used for the global TE
|
||||
$TESTS$
|
||||
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
TOKENNEXT() is compatible with CTIII's TOKENNEXT(),
|
||||
TokenNext() is compatible with CTIII's TokenNext(),
|
||||
but there are two additional parameters featuring local token
|
||||
environments and optional access to tokens.
|
||||
$PLATFORMS$
|
||||
@@ -141,143 +141,143 @@
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
TOKENINIT(),TOKENEXIT(),TOKENNUM(),TOKENAT(),SAVETOKEN(),RESTTOKEN(),TOKENEND()
|
||||
TokenInit(),TokenExit(),TokenNum(),TokenAt(),SAVEToken(),RESTToken(),TokenEnd()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
TOKENNUM()
|
||||
TokenNum()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Get the total number of tokens in a token environment
|
||||
$SYNTAX$
|
||||
TOKENNUM( [<@cTokenEnvironment>] ) -> nNumberofTokens
|
||||
TokenNum( [<@cTokenEnvironment>] ) -> nNumberofTokens
|
||||
$ARGUMENTS$
|
||||
<@cTokenEnvironment> a token environment
|
||||
$RETURNS$
|
||||
<nNumberofTokens> number of tokens in the token environment
|
||||
$DESCRIPTION$
|
||||
The TOKENNUM() function can be used to retrieve the total number
|
||||
The TokenNum() function can be used to retrieve the total number
|
||||
of tokens in a token environment.
|
||||
If the parameter <@cTokenEnvironment> is supplied (must be by
|
||||
reference), the information from this token environment is used,
|
||||
otherwise the global TE is used.
|
||||
$EXAMPLES$
|
||||
tokeninit( "a.b.c.d", ".", 1 ) // initialize global TE
|
||||
? tokennum() // --> 4
|
||||
TokenInit( "a.b.c.d", ".", 1 ) // initialize global TE
|
||||
? TokenNum() // --> 4
|
||||
$TESTS$
|
||||
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
TOKENNUM() is a new function in Harbour's CTIII library.
|
||||
TokenNum() is a new function in Harbour's CTIII library.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
TOKENINIT(),TOKENEXIT(),TOKENNEXT(),TOKENAT(),SAVETOKEN(),RESTTOKEN(),TOKENEND()
|
||||
TokenInit(),TokenExit(),TokenNext(),TokenAt(),SAVEToken(),RESTToken(),TokenEnd()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
TOKENEND()
|
||||
TokenEnd()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Check whether additional tokens are available with TOKENNEXT()
|
||||
Check whether additional tokens are available with TokenNext()
|
||||
$SYNTAX$
|
||||
TOKENEND( [<@cTokenEnvironment>] ) -> lTokenEnd
|
||||
TokenEnd( [<@cTokenEnvironment>] ) -> lTokenEnd
|
||||
$ARGUMENTS$
|
||||
<@cTokenEnvironment> a token environment
|
||||
$RETURNS$
|
||||
<lTokenEnd> .T., if additional tokens are available
|
||||
$DESCRIPTION$
|
||||
The TOKENEND() function can be used to check whether the next
|
||||
call to TOKENNEXT() would return a new token. This can not be
|
||||
decided with TOKENNEXT() alone, since an empty token cannot be
|
||||
The TokenEnd() function can be used to check whether the next
|
||||
call to TokenNext() would return a new token. This can not be
|
||||
decided with TokenNext() alone, since an empty token cannot be
|
||||
distinguished from a "no more" tokens.
|
||||
If the parameter <@cTokenEnvironment> is supplied (must be by
|
||||
reference), the information from this token environment is used,
|
||||
otherwise the global TE is used.
|
||||
With a combination of TOKENEND() and TOKENNEXT(), all tokens from a
|
||||
With a combination of TokenEnd() and TokenNext(), all tokens from a
|
||||
string can be retrieved successivly (see example).
|
||||
$EXAMPLES$
|
||||
tokeninit( "a.b.c.d", ".", 1 ) // initialize global TE
|
||||
DO WHILE ! tokenend()
|
||||
? tokennext( "a.b.c.d" ) // get all tokens successivly
|
||||
TokenInit( "a.b.c.d", ".", 1 ) // initialize global TE
|
||||
DO WHILE ! TokenEnd()
|
||||
? TokenNext( "a.b.c.d" ) // get all tokens successivly
|
||||
ENDDO
|
||||
$TESTS$
|
||||
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
TOKENEND() is compatible with CTIII's TOKENEND(),
|
||||
TokenEnd() is compatible with CTIII's TokenEnd(),
|
||||
but there are is an additional parameter featuring local token environments.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
TOKENINIT(),TOKENEXIT(),TOKENNEXT(),TOKENNUM(),TOKENAT(),SAVETOKEN(),RESTTOKEN()
|
||||
TokenInit(),TokenExit(),TokenNext(),TokenNum(),TokenAt(),SAVEToken(),RESTToken()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
TOKENEXIT()
|
||||
TokenExit()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Release global token environment
|
||||
$SYNTAX$
|
||||
TOKENEXIT() -> lStaticEnvironmentReleased
|
||||
TokenExit() -> lStaticEnvironmentReleased
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
<lStaticEnvironmentReleased> .T., if global token environment is successfully released
|
||||
$DESCRIPTION$
|
||||
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.
|
||||
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.
|
||||
$EXAMPLES$
|
||||
tokeninit( cString ) // initialize a TE
|
||||
DO WHILE ! tokenend()
|
||||
? tokennext( cString ) // get all tokens successivly
|
||||
TokenInit( cString ) // initialize a TE
|
||||
DO WHILE ! TokenEnd()
|
||||
? TokenNext( cString ) // get all tokens successivly
|
||||
ENDDO
|
||||
? tokennext( cString, 3 ) // get the 3rd token, counter will remain the same
|
||||
tokenexit() // free the memory used for the global TE
|
||||
? TokenNext( cString, 3 ) // get the 3rd token, counter will remain the same
|
||||
TokenExit() // free the memory used for the global TE
|
||||
$TESTS$
|
||||
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
TOKENEXIT() is a new function in Harbour's CTIII library.
|
||||
TokenExit() is a new function in Harbour's CTIII library.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
TOKENINIT(),TOKENNEXT(),TOKENNUM(),TOKENAT(),SAVETOKEN(),RESTTOKEN(),TOKENEND()
|
||||
TokenInit(),TokenNext(),TokenNum(),TokenAt(),SAVEToken(),RESTToken(),TokenEnd()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
TOKENAT()
|
||||
TokenAt()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Get start and end positions of tokens in a token environment
|
||||
$SYNTAX$
|
||||
TOKENAT( [<lSeparatorPositionBehindToken>], [<nToken>],
|
||||
TokenAt( [<lSeparatorPositionBehindToken>], [<nToken>],
|
||||
[<@cTokenEnvironment>] ) -> nPosition
|
||||
$ARGUMENTS$
|
||||
<lSeparatorPositionBehindToken> .T., if TOKENAT() should return
|
||||
<lSeparatorPositionBehindToken> .T., if TokenAt() should return
|
||||
the position of the separator character
|
||||
BEHIND the token.
|
||||
Default: .F., return start position of a token.
|
||||
@@ -286,14 +286,14 @@
|
||||
$RETURNS$
|
||||
<nPosition>
|
||||
$DESCRIPTION$
|
||||
The TOKENAT() function is used to retrieve the start and end position
|
||||
The TokenAt() function is used to retrieve the start and end position
|
||||
of the tokens in a token environment. Note however that the position of
|
||||
last character of a token is given by tokenat (.T.)-1 !!
|
||||
|
||||
If the 2nd parameter, <nToken> is given, TOKENAT() returns the
|
||||
If the 2nd parameter, <nToken> is given, TokenAt() returns the
|
||||
positions of the <nToken>th token. Otherwise
|
||||
the token pointed to by the TE counter, i.e. the token that will
|
||||
be retrieved by TOKENNEXT() _NEXT_ is used.
|
||||
be retrieved by TokenNext() _NEXT_ is used.
|
||||
|
||||
If the parameter <@cTokenEnvironment> is supplied (must be by
|
||||
reference), the information from this token environment is used,
|
||||
@@ -301,17 +301,17 @@
|
||||
$EXAMPLES$
|
||||
|
||||
$TESTS$
|
||||
tokeninit( cString ) // initialize a TE
|
||||
DO WHILE ! tokenend()
|
||||
? "From", tokenat(), "to", tokenat( .T. ) - 1
|
||||
? tokennext( cString ) // get all tokens successivly
|
||||
TokenInit( cString ) // initialize a TE
|
||||
DO WHILE ! TokenEnd()
|
||||
? "From", TokenAt(), "to", TokenAt( .T. ) - 1
|
||||
? TokenNext( cString ) // get all tokens successivly
|
||||
ENDDO
|
||||
? tokennext( cString, 3 ) // get the 3rd token, counter will remain the same
|
||||
tokenexit() // free the memory used for the global TE
|
||||
? TokenNext( cString, 3 ) // get the 3rd token, counter will remain the same
|
||||
TokenExit() // free the memory used for the global TE
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
TOKENAT() is compatible with CTIII's TOKENAT(),
|
||||
TokenAt() is compatible with CTIII's TokenAt(),
|
||||
but there are two additional parameters featuring local token
|
||||
environments and optional access to tokens.
|
||||
$PLATFORMS$
|
||||
@@ -319,25 +319,25 @@
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
TOKENINIT(),TOKENEXIT(),TOKENNEXT(),TOKENNUM(),SAVETOKEN(),RESTTOKEN(),TOKENEND()
|
||||
TokenInit(),TokenExit(),TokenNext(),TokenNum(),SAVEToken(),RESTToken(),TokenEnd()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
SAVETOKEN()
|
||||
SAVEToken()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Save the global token environment
|
||||
$SYNTAX$
|
||||
SAVETOKEN() -> cStaticTokenEnvironment
|
||||
SAVEToken() -> cStaticTokenEnvironment
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
<cStaticTokenEnvironment> a binary string encoding the global TE
|
||||
$DESCRIPTION$
|
||||
The SAVETOKEN() function can be used to store the global TE for future
|
||||
The SAVEToken() function can be used to store the global TE for future
|
||||
use or when two or more incremental tokenizers must the nested.
|
||||
Note however that the latter can now be solved with locally stored
|
||||
token environments.
|
||||
@@ -348,34 +348,34 @@
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
SAVETOKEN() is compatible with CTIII's SAVETOKEN(),
|
||||
SAVEToken() is compatible with CTIII's SAVEToken(),
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
TOKENINIT(),TOKENEXIT(),TOKENNEXT(),TOKENNUM(),TOKENAT(),RESTTOKEN(),TOKENEND()
|
||||
TokenInit(),TokenExit(),TokenNext(),TokenNum(),TokenAt(),RESTToken(),TokenEnd()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
RESTTOKEN()
|
||||
RESTToken()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Restore global token environment
|
||||
$SYNTAX$
|
||||
RESTTOKEN( <cStaticTokenEnvironment> ) -> cOldStaticEnvironment
|
||||
RESTToken( <cStaticTokenEnvironment> ) -> cOldStaticEnvironment
|
||||
$ARGUMENTS$
|
||||
<cStaticTokenEnvironment> a binary string encoding a TE
|
||||
$RETURNS$
|
||||
<cOldStaticEnvironment> a string encoding the old global TE
|
||||
$DESCRIPTION$
|
||||
The RESTTOKEN() function restores the global TE to the one encoded
|
||||
The RESTToken() function restores the global TE to the one encoded
|
||||
in <cStaticTokenEnvironment>. This can either be the return value
|
||||
of SAVETOKEN() or the value stored in the 4th parameter in a
|
||||
TOKENINIT() call.
|
||||
of SAVEToken() or the value stored in the 4th parameter in a
|
||||
TokenInit() call.
|
||||
$EXAMPLES$
|
||||
|
||||
$TESTS$
|
||||
@@ -383,12 +383,12 @@
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
RESTTOKEN() is compatible with CTIII's RESTTOKEN(),
|
||||
RESTToken() is compatible with CTIII's RESTToken(),
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
TOKENINIT(),TOKENEXIT(),TOKENNEXT(),TOKENNUM(),TOKENAT(),SAVETOKEN(),TOKENEND()
|
||||
TokenInit(),TokenExit(),TokenNext(),TokenNum(),TokenAt(),SAVEToken(),TokenEnd()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,44 +4,44 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
PI()
|
||||
Pi()
|
||||
$CATEGORY$
|
||||
CT3 math functions
|
||||
$ONELINER$
|
||||
Returns Pi, the perimeter-to-diameter-ratio of a circle
|
||||
$SYNTAX$
|
||||
PI() -> nPi
|
||||
Pi() -> nPi
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
<nPi> the math constant Pi with maximum precision available
|
||||
$DESCRIPTION$
|
||||
The function PI() can be used if the constant Pi is needed
|
||||
The function Pi() can be used if the constant Pi is needed
|
||||
with maximum precision. One of the most known interpretations of this
|
||||
number is the constant perimeter-to-diameter-ratio of circles.
|
||||
$EXAMPLES$
|
||||
// the diameter of a circle-like swimming pool is 3.4 meters, how
|
||||
// long is the perimeter ?
|
||||
|
||||
? Str( PI() * 3.4, 5, 3 ) + " meters" // --> 10.681 meters
|
||||
? Str( Pi() * 3.4, 5, 3 ) + " meters" // --> 10.681 meters
|
||||
$TESTS$
|
||||
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
PI() is compatible with CT3's PI().
|
||||
Pi() is compatible with CT3's Pi().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
SIN(),COS(),TAN(),COT(),ASIN(),ACOS(),ATAN(),ATN2(),SINH(),COSH(),TANH(),RTOD(),DTOR()
|
||||
Sin(),Cos(),Tan(),Cot(),ASin(),ACos(),ATan(),Atn2(),Sinh(),Cosh(),Tanh(),RToD(),DToR()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
SIN()
|
||||
Sin()
|
||||
$CATEGORY$
|
||||
CT3 math functions
|
||||
$ONELINER$
|
||||
@@ -53,496 +53,496 @@
|
||||
$RETURNS$
|
||||
<nSine> the sine of <nRadiant>
|
||||
$DESCRIPTION$
|
||||
The function SIN() calculates the sine of an angle whose size is
|
||||
given in radiants (full angle equals 2*Pi - see DTOR() for angle size
|
||||
The function Sin() calculates the sine of an angle whose size is
|
||||
given in radiants (full angle equals 2*Pi - see DToR() for angle size
|
||||
given in degress).
|
||||
A common geometric interpretation of the SIN() function is the
|
||||
A common geometric interpretation of the Sin() function is the
|
||||
counterkathede-hypotenuse-ratio of a right-angled triangle.
|
||||
$EXAMPLES$
|
||||
? sin( 0.0 ) // --> 0.0
|
||||
? sin( 1.0 ) // --> 0.8414...
|
||||
? Sin( 0.0 ) // --> 0.0
|
||||
? Sin( 1.0 ) // --> 0.8414...
|
||||
$TESTS$
|
||||
sin( 0.0 ) == 0.0
|
||||
sin( PI() / 4 ) == Sqrt( 1 / 2 )
|
||||
sin( PI() / 2 ) == 1.0
|
||||
sin( PI() ) == 0.0
|
||||
Sin( 0.0 ) == 0.0
|
||||
Sin( Pi() / 4 ) == Sqrt( 1 / 2 )
|
||||
Sin( Pi() / 2 ) == 1.0
|
||||
Sin( Pi() ) == 0.0
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
SIN() is compatible with CT3's SIN().
|
||||
Sin() is compatible with CT3's Sin().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
COS(),TAN(),COT(),ASIN(),ACOS(),ATAN(),ATN2(),SINH(),COSH(),TANH(),RTOD(),DTOR(),PI()
|
||||
Cos(),Tan(),Cot(),ASin(),ACos(),ATan(),Atn2(),Sinh(),Cosh(),Tanh(),RToD(),DToR(),Pi()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
COS()
|
||||
Cos()
|
||||
$CATEGORY$
|
||||
CT3 math functions
|
||||
$ONELINER$
|
||||
Cosine of the argument
|
||||
$SYNTAX$
|
||||
COS( nRadiant ) -> nCosine
|
||||
Cos( nRadiant ) -> nCosine
|
||||
$ARGUMENTS$
|
||||
<nRadiant> an angle size given in radiants
|
||||
$RETURNS$
|
||||
<nCosine> the cosine of <nRadiant>
|
||||
$DESCRIPTION$
|
||||
The function COS() calculates the cosine of an angle whose size is
|
||||
given in radiants (full angle equals 2*Pi - see DTOR() for angle size
|
||||
The function Cos() calculates the cosine of an angle whose size is
|
||||
given in radiants (full angle equals 2*Pi - see DToR() for angle size
|
||||
given in degress).
|
||||
A common geometric interpretation of the COS() function is the
|
||||
A common geometric interpretation of the Cos() function is the
|
||||
ankathede-hypotenuse-ratio of a right-angled triangle.
|
||||
$EXAMPLES$
|
||||
? cos( 0.0 ) // --> 1.0
|
||||
? cos( 1.0 ) // --> 0.5403...
|
||||
? Cos( 0.0 ) // --> 1.0
|
||||
? Cos( 1.0 ) // --> 0.5403...
|
||||
$TESTS$
|
||||
cos( 0.0 ) == 1.0
|
||||
cos( PI() / 4 ) == Sqrt( 1 / 2 )
|
||||
cos( PI() / 2 ) == 0.0
|
||||
cos( PI() ) == -1.0
|
||||
Cos( 0.0 ) == 1.0
|
||||
Cos( Pi() / 4 ) == Sqrt( 1 / 2 )
|
||||
Cos( Pi() / 2 ) == 0.0
|
||||
Cos( Pi() ) == -1.0
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
COS() is compatible with CT3's COS().
|
||||
Cos() is compatible with CT3's Cos().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
SIN(),TAN(),COT(),ASIN(),ACOS(),ATAN(),ATN2(),SINH(),COSH(),TANH(),RTOD(),DTOR(),PI()
|
||||
Sin(),Tan(),Cot(),ASin(),ACos(),ATan(),Atn2(),Sinh(),Cosh(),Tanh(),RToD(),DToR(),Pi()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
TAN()
|
||||
Tan()
|
||||
$CATEGORY$
|
||||
CT3 math functions
|
||||
$ONELINER$
|
||||
Tangent of the argument
|
||||
$SYNTAX$
|
||||
TAN( nRadiant ) -> nTangent
|
||||
Tan( nRadiant ) -> nTangent
|
||||
$ARGUMENTS$
|
||||
<nRadiant> an angle size given in radiants
|
||||
$RETURNS$
|
||||
<nTangent> the tangent of <nRadiant>
|
||||
$DESCRIPTION$
|
||||
The function TAN() calculates the tangent of an angle whose size is
|
||||
given in radiants (full angle equals 2*Pi - see DTOR() for angle size
|
||||
The function Tan() calculates the tangent of an angle whose size is
|
||||
given in radiants (full angle equals 2*Pi - see DToR() for angle size
|
||||
given in degress).
|
||||
A common geometric interpretation of the TAN() function is the
|
||||
A common geometric interpretation of the Tan() function is the
|
||||
counterkathede-ankathede-ratio of a right-angled triangle, or,
|
||||
tan(x) = sin(x)/cos(x).
|
||||
Tan(x) = Sin(x)/Cos(x).
|
||||
$EXAMPLES$
|
||||
? tan( 0.0 ) // --> 0.0
|
||||
? tan( 1.0 ) // --> 1.5574...
|
||||
? Tan( 0.0 ) // --> 0.0
|
||||
? Tan( 1.0 ) // --> 1.5574...
|
||||
$TESTS$
|
||||
tan( 0.0 ) == 0.0
|
||||
tan( PI() / 4 ) == 1
|
||||
tan( PI() ) == 0.0
|
||||
Tan( 0.0 ) == 0.0
|
||||
Tan( Pi() / 4 ) == 1
|
||||
Tan( Pi() ) == 0.0
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
TAN() is compatible with CT3's TAN().
|
||||
Tan() is compatible with CT3's Tan().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
SIN(),COS(),COT(),ASIN(),ACOS(),ATAN(),ATN2(),SINH(),COSH(),TANH(),RTOD(),DTOR(),PI()
|
||||
Sin(),Cos(),Cot(),ASin(),ACos(),ATan(),Atn2(),Sinh(),Cosh(),Tanh(),RToD(),DToR(),Pi()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
COT()
|
||||
Cot()
|
||||
$CATEGORY$
|
||||
CT3 math functions
|
||||
$ONELINER$
|
||||
Cotangent of the argument
|
||||
$SYNTAX$
|
||||
COT( nRadiant ) -> nCotangent
|
||||
Cot( nRadiant ) -> nCotangent
|
||||
$ARGUMENTS$
|
||||
<nRadiant> an angle size given in radiants
|
||||
$RETURNS$
|
||||
<nCotangent> the cotangent of <nRadiant>
|
||||
$DESCRIPTION$
|
||||
The function COT() calculates the cotangent of an angle whose size is
|
||||
given in radiants (full angle equals 2*Pi - see DTOR() for angle size
|
||||
The function Cot() calculates the cotangent of an angle whose size is
|
||||
given in radiants (full angle equals 2*Pi - see DToR() for angle size
|
||||
given in degress).
|
||||
A common geometric interpretation of the COT() function is the
|
||||
A common geometric interpretation of the Cot() function is the
|
||||
ankathede-counterkathede-ratio of a right-angled triangle, or,
|
||||
cot(x) = cos(x)/sin(x)=1/tan(x).
|
||||
Cot(x) = Cos(x)/Sin(x)=1/Tan(x).
|
||||
$EXAMPLES$
|
||||
? cot( 1.0 ) // --> 0.6420...
|
||||
? Cot( 1.0 ) // --> 0.6420...
|
||||
$TESTS$
|
||||
cot( PI() / 4 ) == 1
|
||||
cot( PI() / 2 ) == 0
|
||||
Cot( Pi() / 4 ) == 1
|
||||
Cot( Pi() / 2 ) == 0
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
COT() is compatible with CT3's COT().
|
||||
Cot() is compatible with CT3's Cot().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
SIN(),COS(),TAN(),ASIN(),ACOS(),ATAN(),ATN2(),SINH(),COSH(),TANH(),RTOD(),DTOR(),PI()
|
||||
Sin(),Cos(),Tan(),ASin(),ACos(),ATan(),Atn2(),Sinh(),Cosh(),Tanh(),RToD(),DToR(),Pi()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
ASIN()
|
||||
ASin()
|
||||
$CATEGORY$
|
||||
CT3 math functions
|
||||
$ONELINER$
|
||||
Arcus sine of the argument
|
||||
$SYNTAX$
|
||||
ASIN( nSine ) -> nRadiant
|
||||
ASin( nSine ) -> nRadiant
|
||||
$ARGUMENTS$
|
||||
<nSine> the sine of an angle
|
||||
$RETURNS$
|
||||
<nRadiant> the angle whose sine is <nSine>
|
||||
$DESCRIPTION$
|
||||
The function ASIN() is the inverse function of SIN(). It takes a
|
||||
The function ASin() is the inverse function of Sin(). It takes a
|
||||
sine value and returns the smallest(!) angle whose sine equals to the argument.
|
||||
The return value is given in radiants (full angle equals 2*Pi -
|
||||
see DTOR() if you need to convert it into degress).
|
||||
see DToR() if you need to convert it into degress).
|
||||
Note, that <nSine> must be between -1 and 1 and that <nRadiant>
|
||||
is always between -PI()/2 and PI()/2.
|
||||
is always between -Pi()/2 and Pi()/2.
|
||||
$EXAMPLES$
|
||||
? asin( 0.0 ) // --> 0.0
|
||||
? asin( 0.5 ) // --> 0.5235...
|
||||
? aSin( 0.0 ) // --> 0.0
|
||||
? aSin( 0.5 ) // --> 0.5235...
|
||||
$TESTS$
|
||||
asin( 0.0 ) == 0.0
|
||||
asin( Sqrt( 1 / 2 ) ) == PI() / 4
|
||||
asin( 1.0 ) == PI() / 2
|
||||
asin( 0.0 ) == 0.0 // and not PI(), since the smallest angle is returned !
|
||||
aSin( 0.0 ) == 0.0
|
||||
aSin( Sqrt( 1 / 2 ) ) == Pi() / 4
|
||||
aSin( 1.0 ) == Pi() / 2
|
||||
aSin( 0.0 ) == 0.0 // and not Pi(), since the smallest angle is returned !
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
ASIN() is compatible with CT3's ASIN().
|
||||
ASin() is compatible with CT3's ASin().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
SIN(),COS(),TAN(),COT(),ACOS(),ATAN(),ATN2(),SINH(),COSH(),TANH(),RTOD(),DTOR(),PI()
|
||||
Sin(),Cos(),Tan(),Cot(),ACos(),ATan(),Atn2(),Sinh(),Cosh(),Tanh(),RToD(),DToR(),Pi()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
ACOS()
|
||||
ACos()
|
||||
$CATEGORY$
|
||||
CT3 math functions
|
||||
$ONELINER$
|
||||
Arcus cosine of the argument
|
||||
$SYNTAX$
|
||||
ACOS( nCosine ) -> nRadiant
|
||||
ACos( nCosine ) -> nRadiant
|
||||
$ARGUMENTS$
|
||||
<nCosine> the cosine of an angle
|
||||
$RETURNS$
|
||||
<nRadiant> the angle whose cosine is <nCosine>
|
||||
$DESCRIPTION$
|
||||
The function ACOS() is the inverse function of COS(). It takes a
|
||||
The function ACos() is the inverse function of Cos(). It takes a
|
||||
cosine value and returns the smallest(!) angle whose cosine equals to the argument.
|
||||
The return value is given in radiants (full angle equals 2*Pi -
|
||||
see DTOR() if you need to convert it into degress).
|
||||
see DToR() if you need to convert it into degress).
|
||||
Note, that <nCosine> must be between -1 and 1 and that <nRadiant>
|
||||
is always between 0 and PI().
|
||||
is always between 0 and Pi().
|
||||
$EXAMPLES$
|
||||
? acos( 0.0 ) // --> PI() / 2
|
||||
? acos( 0.5 ) // --> 1.04719...
|
||||
? aCos( 0.0 ) // --> Pi() / 2
|
||||
? aCos( 0.5 ) // --> 1.04719...
|
||||
$TESTS$
|
||||
acos( 0.0 ) == PI() / 2
|
||||
acos( Sqrt( 1 / 2 ) ) == PI() / 4
|
||||
acos( 1.0 ) == 0.0
|
||||
acos( -1.0 ) == PI()
|
||||
acos( 0.0 ) == PI() / 2 // and not -PI()/2, although cos (-PI()/2) == 0.0 !
|
||||
aCos( 0.0 ) == Pi() / 2
|
||||
aCos( Sqrt( 1 / 2 ) ) == Pi() / 4
|
||||
aCos( 1.0 ) == 0.0
|
||||
aCos( -1.0 ) == Pi()
|
||||
aCos( 0.0 ) == Pi() / 2 // and not -Pi()/2, although cos (-Pi()/2) == 0.0 !
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
ACOS() is compatible with CT3's ACOS().
|
||||
ACos() is compatible with CT3's ACos().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
SIN(),COS(),TAN(),COT(),ASIN(),ATAN(),ATN2(),SINH(),COSH(),TANH(),RTOD(),DTOR(),PI()
|
||||
Sin(),Cos(),Tan(),Cot(),ASin(),ATan(),Atn2(),Sinh(),Cosh(),Tanh(),RToD(),DToR(),Pi()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
ATAN()
|
||||
ATan()
|
||||
$CATEGORY$
|
||||
CT3 math functions
|
||||
$ONELINER$
|
||||
Arcus tangent of the argument
|
||||
$SYNTAX$
|
||||
ACOS( nTangent ) -> nRadiant
|
||||
ACos( nTangent ) -> nRadiant
|
||||
$ARGUMENTS$
|
||||
<nTangent> the tangent of an angle
|
||||
$RETURNS$
|
||||
<nRadiant> the angle whose tangent is <nTangent>
|
||||
$DESCRIPTION$
|
||||
The function ATAN() is the inverse function of TAN(). It takes a
|
||||
The function ATan() is the inverse function of Tan(). It takes a
|
||||
tangent value and returns the smallest(!) angle whose tangent equals to the argument.
|
||||
The return value is given in radiants between -PI()/2 and PI()/2
|
||||
(full angle equals 2*Pi - see DTOR() if you need to convert it into degress).
|
||||
The return value is given in radiants between -Pi()/2 and Pi()/2
|
||||
(full angle equals 2*Pi - see DToR() if you need to convert it into degress).
|
||||
$EXAMPLES$
|
||||
? atan( 0.0 ) // --> 0.0
|
||||
? atan( 0.5 ) // --> 0.4636...
|
||||
? aTan( 0.0 ) // --> 0.0
|
||||
? aTan( 0.5 ) // --> 0.4636...
|
||||
$TESTS$
|
||||
atan( 0.0 ) == 0.0
|
||||
atan( 1.0 ) == PI() / 4
|
||||
atan( 0.0 ) == 0.0 // and not PI(), although tan( PI() ) == 0.0 !
|
||||
aTan( 0.0 ) == 0.0
|
||||
aTan( 1.0 ) == Pi() / 4
|
||||
aTan( 0.0 ) == 0.0 // and not Pi(), although Tan( Pi() ) == 0.0 !
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
ATAN() is compatible with CT3's ATAN().
|
||||
ATan() is compatible with CT3's ATan().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
SIN(),COS(),TAN(),COT(),ASIN(),ACOS(),ATAN(),SINH(),COSH(),TANH(),RTOD(),DTOR(),PI()
|
||||
Sin(),Cos(),Tan(),Cot(),ASin(),ACos(),ATan(),Sinh(),Cosh(),Tanh(),RToD(),DToR(),Pi()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
ATN2()
|
||||
Atn2()
|
||||
$CATEGORY$
|
||||
CT3 math functions
|
||||
$ONELINER$
|
||||
Arcus tangent a sine and a cosine argument
|
||||
$SYNTAX$
|
||||
ATN2( nSine, nCosine ) -> nRadiant
|
||||
Atn2( nSine, nCosine ) -> nRadiant
|
||||
$ARGUMENTS$
|
||||
<nSine> the sine of an angle
|
||||
<nCosine> the cosine of an angle
|
||||
$RETURNS$
|
||||
<nRadiant> the angle whose tangent is <nSine>/<nCosine>
|
||||
$DESCRIPTION$
|
||||
The function ATN2() is an alternate function for calculating
|
||||
the arcus tangent, atn2(x,y) = atan(x/y).
|
||||
The function Atn2() is an alternate function for calculating
|
||||
the arcus tangent, Atn2(x,y) = aTan(x/y).
|
||||
It takes two arguments, the sine and the cosine
|
||||
of the angle that should be calculated. Thus, in contrast to the ATAN()
|
||||
function, ATN2() can distinguish whether the sine or the cosine has
|
||||
of the angle that should be calculated. Thus, in contrast to the ATan()
|
||||
function, Atn2() can distinguish whether the sine or the cosine has
|
||||
a negative sign (or both being positive or negative), so that
|
||||
the return value can be between -PI() and PI() and covers the full
|
||||
the return value can be between -Pi() and Pi() and covers the full
|
||||
angle.
|
||||
The return value is given in radiants (full angle equals 2*Pi -
|
||||
see DTOR() if you need to convert it into degress).
|
||||
see DToR() if you need to convert it into degress).
|
||||
$EXAMPLES$
|
||||
? atn2( 0.0, 1.0 ) // --> 0.0
|
||||
? atn2( Sqrt( 1 / 2 ), Sqrt( 1 / 2 ) ) // --> PI() / 4
|
||||
? Atn2( 0.0, 1.0 ) // --> 0.0
|
||||
? Atn2( Sqrt( 1 / 2 ), Sqrt( 1 / 2 ) ) // --> Pi() / 4
|
||||
$TESTS$
|
||||
atn2( 0.0, 1.0 ) == 0.0
|
||||
atn2( Sqrt( 1 / 2 ), Sqrt( 1 / 2 ) ) == PI() / 4
|
||||
atn2( -Sqrt( 1 / 2 ), -Sqrt( 1 / 2 ) ) == -3 / 4 * PI() // atan() would return PI() / 4 !
|
||||
Atn2( 0.0, 1.0 ) == 0.0
|
||||
Atn2( Sqrt( 1 / 2 ), Sqrt( 1 / 2 ) ) == Pi() / 4
|
||||
Atn2( -Sqrt( 1 / 2 ), -Sqrt( 1 / 2 ) ) == -3 / 4 * Pi() // aTan() would return Pi() / 4 !
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
ATN2() is compatible with CT3's ATN2().
|
||||
Atn2() is compatible with CT3's Atn2().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
SIN(),COS(),TAN(),COT(),ASIN(),ACOS(),ATAN(),SINH(),COSH(),TANH(),RTOD(),DTOR(),PI()
|
||||
Sin(),Cos(),Tan(),Cot(),ASin(),ACos(),ATan(),Sinh(),Cosh(),Tanh(),RToD(),DToR(),Pi()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
SINH()
|
||||
Sinh()
|
||||
$CATEGORY$
|
||||
CT3 math functions
|
||||
$ONELINER$
|
||||
Hyperbolic Sine of the argument
|
||||
$SYNTAX$
|
||||
SINH( nArea ) -> nHyperbolicSine
|
||||
Sinh( nArea ) -> nHyperbolicSine
|
||||
$ARGUMENTS$
|
||||
<nArea> the size of the area (see below)
|
||||
$RETURNS$
|
||||
<nHyperbolicSine> the hyperbolic sine of <nArea>
|
||||
$DESCRIPTION$
|
||||
The function SINH() calculates the hyperbolic sine of the argument.
|
||||
In analytical mathematics it is defined as 1/2*(exp(nArea)-exp(-nArea)).
|
||||
A common geometric interpretation of the SINH() function is the
|
||||
The function Sinh() calculates the hyperbolic sine of the argument.
|
||||
In analytical mathematics it is defined as 1/2*(Exp(nArea)-Exp(-nArea)).
|
||||
A common geometric interpretation of the Sinh() function is the
|
||||
maximum y value of the points in the area with the given size <nArea>,
|
||||
that is bound by the x axis, a straight line through the point of
|
||||
origin (this one is fixed by the area) and the hyperbola x^2-y^2=1.
|
||||
$EXAMPLES$
|
||||
? sinh( 0.0 ) // --> 0.0
|
||||
? sinh( 1.0 ) // --> 1.1752...
|
||||
? Sinh( 0.0 ) // --> 0.0
|
||||
? Sinh( 1.0 ) // --> 1.1752...
|
||||
$TESTS$
|
||||
sinh( 0.0 ) == 0.0
|
||||
sinh( -0.5 ) == -sinh( 0.5 )
|
||||
Sinh( 0.0 ) == 0.0
|
||||
Sinh( -0.5 ) == -Sinh( 0.5 )
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
SINH() is new in Harbours CT3's library.
|
||||
Sinh() is new in Harbours CT3's library.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
SIN(),COS(),TAN(),COT(),ASIN(),ACOS(),ATAN(),ATN2(),COSH(),TANH(),RTOD(),DTOR(),PI()
|
||||
Sin(),Cos(),Tan(),Cot(),ASin(),ACos(),ATan(),Atn2(),Cosh(),Tanh(),RToD(),DToR(),Pi()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
COSH()
|
||||
Cosh()
|
||||
$CATEGORY$
|
||||
CT3 math functions
|
||||
$ONELINER$
|
||||
Hyperbolic Cosine of the argument
|
||||
$SYNTAX$
|
||||
COSH( nArea ) -> nHyperbolicCosine
|
||||
Cosh( nArea ) -> nHyperbolicCosine
|
||||
$ARGUMENTS$
|
||||
<nArea> the size of the area (see below)
|
||||
$RETURNS$
|
||||
<nHyperbolicCosine> the hyperbolic cosine of <nArea>
|
||||
$DESCRIPTION$
|
||||
The function COSH() calculates the hyperbolic cosine of the argument.
|
||||
In analytical mathematics it is defined as 1/2*(exp(nArea)+exp(-nArea)).
|
||||
A common geometric interpretation of the COSH() function is the
|
||||
The function Cosh() calculates the hyperbolic cosine of the argument.
|
||||
In analytical mathematics it is defined as 1/2*(Exp(nArea)+Exp(-nArea)).
|
||||
A common geometric interpretation of the Cosh() function is the
|
||||
maximum x value of the points in the area with the given size <nArea>,
|
||||
that is bound by the x axis, a straight line through the point of
|
||||
origin (this one is fixed by the area) and the hyperbola x^2-y^2=1.
|
||||
$EXAMPLES$
|
||||
? cosh( 0.0 ) // --> 1.0
|
||||
? cosh( 1.0 ) // --> 1.5430...
|
||||
? Cosh( 0.0 ) // --> 1.0
|
||||
? Cosh( 1.0 ) // --> 1.5430...
|
||||
$TESTS$
|
||||
cosh( 0.0 ) == 1.0
|
||||
cosh( -0.5 ) == cosh( 0.5 )
|
||||
Cosh( 0.0 ) == 1.0
|
||||
Cosh( -0.5 ) == Cosh( 0.5 )
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
COSH() is new in Harbours CT3's library.
|
||||
Cosh() is new in Harbours CT3's library.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
SIN(),COS(),TAN(),COT(),ASIN(),ACOS(),ATAN(),ATN2(),SINH(),TANH(),RTOD(),DTOR(),PI()
|
||||
Sin(),Cos(),Tan(),Cot(),ASin(),ACos(),ATan(),Atn2(),Sinh(),Tanh(),RToD(),DToR(),Pi()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
TANH()
|
||||
Tanh()
|
||||
$CATEGORY$
|
||||
CT3 math functions
|
||||
$ONELINER$
|
||||
Hyperbolic Tangent of the argument
|
||||
$SYNTAX$
|
||||
TANH( nArea ) -> nHyperbolicTangent
|
||||
Tanh( nArea ) -> nHyperbolicTangent
|
||||
$ARGUMENTS$
|
||||
<nArea> the size of the area (see below)
|
||||
$RETURNS$
|
||||
<nHyperbolicTangent> the hyperbolic tangent of <nArea>
|
||||
$DESCRIPTION$
|
||||
The function TANH() calculates the hyperbolic tangent of the argument.
|
||||
In analytical mathematics it is defined as SINH(x)/COSH(x).
|
||||
The function Tanh() calculates the hyperbolic tangent of the argument.
|
||||
In analytical mathematics it is defined as Sinh(x)/Cosh(x).
|
||||
$EXAMPLES$
|
||||
? tanh( 0.0 ) // --> 0.0
|
||||
? tanh( 1.0 ) // --> 0.7615...
|
||||
? Tanh( 0.0 ) // --> 0.0
|
||||
? Tanh( 1.0 ) // --> 0.7615...
|
||||
$TESTS$
|
||||
tanh( 0.0 ) == 0.0
|
||||
tanh( -0.5 ) == -tanh( 0.5 )
|
||||
Tanh( 0.0 ) == 0.0
|
||||
Tanh( -0.5 ) == -Tanh( 0.5 )
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
TANH() is new in Harbours CT3's library.
|
||||
Tanh() is new in Harbours CT3's library.
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
SIN(),COS(),TAN(),COT(),ASIN(),ACOS(),ATAN(),ATN2(),SINH(),COSH(),RTOD(),DTOR(),PI()
|
||||
Sin(),Cos(),Tan(),Cot(),ASin(),ACos(),ATan(),Atn2(),Sinh(),Cosh(),RToD(),DToR(),Pi()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
RTOD()
|
||||
RToD()
|
||||
$CATEGORY$
|
||||
CT3 math functions
|
||||
$ONELINER$
|
||||
Convert radiant to degree
|
||||
$SYNTAX$
|
||||
RTOD( nRadiant ) -> nDegree
|
||||
RToD( nRadiant ) -> nDegree
|
||||
$ARGUMENTS$
|
||||
<nRadiant> the size of an angle in radiant
|
||||
$RETURNS$
|
||||
<nDegree> the size of that angle in degree
|
||||
$DESCRIPTION$
|
||||
The function RTOD() can be used to convert sizes of angles given
|
||||
The function RToD() can be used to convert sizes of angles given
|
||||
in radiant (like those returned by the asin, acos or atan function)
|
||||
to degrees that are commonly used geometry and technics.
|
||||
$EXAMPLES$
|
||||
? rtod( PI() ) // --> 180
|
||||
? tanh( PI() / 3 ) // --> 60
|
||||
? RToD( Pi() ) // --> 180
|
||||
? Tanh( Pi() / 3 ) // --> 60
|
||||
$TESTS$
|
||||
rtod( 0.0 ) == 0.0
|
||||
rtod( PI() ) == 180.0
|
||||
RToD( 0.0 ) == 0.0
|
||||
RToD( Pi() ) == 180.0
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
RTOD() is compatible with CT3's RTOD().
|
||||
RToD() is compatible with CT3's RToD().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
SIN(),COS(),TAN(),COT(),ASIN(),ACOS(),ATAN(),ATN2(),SINH(),COSH(),TANH(),DTOR(),PI()
|
||||
Sin(),Cos(),Tan(),Cot(),ASin(),ACos(),ATan(),Atn2(),Sinh(),Cosh(),Tanh(),DToR(),Pi()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
DTOR()
|
||||
DToR()
|
||||
$CATEGORY$
|
||||
CT3 math functions
|
||||
$ONELINER$
|
||||
Convert degree to radiant
|
||||
$SYNTAX$
|
||||
DTOR( nDegree ) -> nRadiant
|
||||
DToR( nDegree ) -> nRadiant
|
||||
$ARGUMENTS$
|
||||
<nDegree> the size of that angle in degree
|
||||
$RETURNS$
|
||||
<nRadiant> the size of an angle in radiant
|
||||
$DESCRIPTION$
|
||||
The function DTOR() can be used to convert sizes of angles given
|
||||
The function DToR() can be used to convert sizes of angles given
|
||||
in degrees to radiant (as expected by sin, cos or tan functions).
|
||||
$EXAMPLES$
|
||||
? dtor( 180 ) // --> PI()
|
||||
? dtor( 60 ) // --> PI() / 3
|
||||
? DToR( 180 ) // --> Pi()
|
||||
? DToR( 60 ) // --> Pi() / 3
|
||||
$TESTS$
|
||||
dtor( 0.0 ) == 0.0
|
||||
dtor( 180.0 ) == PI()
|
||||
DToR( 0.0 ) == 0.0
|
||||
DToR( 180.0 ) == Pi()
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
DTOR() is compatible with CT3's DTOR().
|
||||
DToR() is compatible with CT3's DToR().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
SIN(),COS(),TAN(),COT(),ASIN(),ACOS(),ATAN(),ATN2(),SINH(),COSH(),TANH(),RTOD(),PI()
|
||||
Sin(),Cos(),Tan(),Cot(),ASin(),ACos(),ATan(),Atn2(),Sinh(),Cosh(),Tanh(),RToD(),Pi()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
CHARPIX()
|
||||
CharPix()
|
||||
$CATEGORY$
|
||||
HBCT video functions
|
||||
$ONELINER$
|
||||
Gets the number of scan lines per character.
|
||||
$SYNTAX$
|
||||
CHARPIX() --> nHeight
|
||||
CharPix() --> nHeight
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -36,13 +36,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
VGAPALETTE()
|
||||
VGAPalette()
|
||||
$CATEGORY$
|
||||
HBCT video functions
|
||||
$ONELINER$
|
||||
Changes VGA palette colors
|
||||
$SYNTAX$
|
||||
VGAPALETTE( [<cColor|nColor>, [<nRedValue>, <nGreenValue>,
|
||||
VGAPalette( [<cColor|nColor>, [<nRedValue>, <nGreenValue>,
|
||||
<nBlueValue]] ) --> lValid
|
||||
$ARGUMENTS$
|
||||
<cColor|nColor> - the color to change in CA-Cl*pper color notation or
|
||||
@@ -76,13 +76,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
VIDEOTYPE()
|
||||
VideoType()
|
||||
$CATEGORY$
|
||||
HBCT video functions
|
||||
$ONELINER$
|
||||
Detects supported video adapter modes
|
||||
$SYNTAX$
|
||||
VIDEOTYPE() --> nMask
|
||||
VideoType() --> nMask
|
||||
$ARGUMENTS$
|
||||
|
||||
$RETURNS$
|
||||
@@ -108,15 +108,15 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
SETFONT()
|
||||
SetFont()
|
||||
$CATEGORY$
|
||||
HBCT video functions
|
||||
$ONELINER$
|
||||
Loads font from a string.
|
||||
$SYNTAX$
|
||||
SETFONT( <cFontString>, [<nFontArea>], [<nOffset>], [<nCounter>] ) --> nError
|
||||
SetFont( <cFontString>, [<nFontArea>], [<nOffset>], [<nCounter>] ) --> nError
|
||||
or:
|
||||
SETFONT( <cFontString>, [<nFontArea>], [<lCompute>] ) --> nError
|
||||
SetFont( <cFontString>, [<nFontArea>], [<lCompute>] ) --> nError
|
||||
$ARGUMENTS$
|
||||
<cFontString> Binary string containing a valid font definition.
|
||||
<nFontArea> Number of a font area where the font must be loaded.
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
WORDREPL()
|
||||
WordRepl()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Replacement of double characters
|
||||
$SYNTAX$
|
||||
WORDREPL( <cDoubleCharacterSearchString>, <[@]cString>,
|
||||
WordRepl( <cDoubleCharacterSearchString>, <[@]cString>,
|
||||
<cDoubleCharacterReplaceString>, [<lMode>] ) -> cString
|
||||
$ARGUMENTS$
|
||||
<cDoubleCharacterSearchString> is a string of double characters
|
||||
@@ -23,7 +23,7 @@
|
||||
$RETURNS$
|
||||
cString the processed string
|
||||
$DESCRIPTION$
|
||||
The WORDREPL() takes the double characters of <cDoubleCharacterSearchString>
|
||||
The WordRepl() takes the double characters of <cDoubleCharacterSearchString>
|
||||
one after the other and searches for them in <cString>.
|
||||
For <lMode> set to .F., this search is successful, if the double
|
||||
character sequence in <cString> starts at an odd position or at any
|
||||
@@ -35,33 +35,33 @@
|
||||
the "rest" of <cDoubleCharacterSearchString>. Note that the last double
|
||||
character sequence in "AABBC" is "BB" in this context !!
|
||||
After the replacement the function restarts the search in <cString>
|
||||
BEHIND the replacement if the CSETATMUPA() switch is turned off, or
|
||||
BEHIND the replacement if the CSetAtMupa() switch is turned off, or
|
||||
BEHIND the first character of the replacement if the switch is turned on.
|
||||
(see examples for this !)
|
||||
One can omit the return value of this function by setting the CSETREF()
|
||||
One can omit the return value of this function by setting the CSetRef()
|
||||
to .T., but one must then pass <cString> by reference to get a result.
|
||||
$EXAMPLES$
|
||||
? wordrepl( "CC", "AABBCCDDEE", "XX" ) // "AABBXXDDEE"
|
||||
? wordrepl( "aa", "1aaaa", "ba" ) // "1abaa"
|
||||
? wordrepl( "aa", "1aaaa", "ba", .T. ) // "1baba"
|
||||
csetatmupa( .T. )
|
||||
? wordrepl( "aa", "1aaaa", "ba" ) // "1abaa"
|
||||
? wordrepl( "aa", "1aaaa", "ba", .T. ) // "1bbba"
|
||||
? WordRepl( "CC", "AABBCCDDEE", "XX" ) // "AABBXXDDEE"
|
||||
? WordRepl( "aa", "1aaaa", "ba" ) // "1abaa"
|
||||
? WordRepl( "aa", "1aaaa", "ba", .T. ) // "1baba"
|
||||
CSetAtMupa( .T. )
|
||||
? WordRepl( "aa", "1aaaa", "ba" ) // "1abaa"
|
||||
? WordRepl( "aa", "1aaaa", "ba", .T. ) // "1bbba"
|
||||
$TESTS$
|
||||
wordrepl( "CC", "AABBCCDDEE", "XX" ) == "AABBXXDDEE"
|
||||
wordrepl( "aa", "1aaaa", "ba" ) == "1abaa"
|
||||
wordrepl( "aa", "1aaaa", "ba", .T. ) == "1baba"
|
||||
Eval( {|| csetatmupa( .T. ), wordrepl( "aa", "1aaaa", "ba" ) } ) == "1abaa"
|
||||
Eval( {|| csetatmupa( .T. ), wordrepl( "aa", "1aaaa", "ba", .T. ) } ) == "1bbba"
|
||||
WordRepl( "CC", "AABBCCDDEE", "XX" ) == "AABBXXDDEE"
|
||||
WordRepl( "aa", "1aaaa", "ba" ) == "1abaa"
|
||||
WordRepl( "aa", "1aaaa", "ba", .T. ) == "1baba"
|
||||
Eval( {|| CSetAtMupa( .T. ), WordRepl( "aa", "1aaaa", "ba" ) } ) == "1abaa"
|
||||
Eval( {|| CSetAtMupa( .T. ), WordRepl( "aa", "1aaaa", "ba", .T. ) } ) == "1bbba"
|
||||
$STATUS$
|
||||
Ready
|
||||
$COMPLIANCE$
|
||||
WORDREPL() is compatible with CT3's WORDREPL().
|
||||
WordRepl() is compatible with CT3's WordRepl().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CHARREPL(),RANGEREPL(),POSREPL(),CSETREF(),CSETATMUPA()
|
||||
CharRepl(),RangeRepl(),PosRepl(),CSetRef(),CSetAtMupa()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
WORDTOCHAR()
|
||||
WordToChar()
|
||||
$CATEGORY$
|
||||
CT3 string functions
|
||||
$ONELINER$
|
||||
Replace double with single characters
|
||||
$SYNTAX$
|
||||
WORDTOCHAR( <cDoubleCharacterSearchString>, <cString>,
|
||||
WordToChar( <cDoubleCharacterSearchString>, <cString>,
|
||||
<cSingleCharacterReplaceString> ) -> cString
|
||||
$ARGUMENTS$
|
||||
|
||||
@@ -25,12 +25,12 @@
|
||||
$STATUS$
|
||||
Started
|
||||
$COMPLIANCE$
|
||||
WORDTOCHAR() is compatible with CT3's WORDTOCHAR().
|
||||
WordToChar() is compatible with CT3's WordToChar().
|
||||
$PLATFORMS$
|
||||
All
|
||||
$FILES$
|
||||
Library is libct.
|
||||
$SEEALSO$
|
||||
CSETATMUPA(),CHARREPL(),WORDREPL()
|
||||
CSetAtMupa(),CharRepl(),WordRepl()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* Test CT3 function ChaRand()
|
||||
* Test CT3 function CharAnd()
|
||||
*
|
||||
* Copyright 2001 IntTec GmbH, Neunlindenstr 32, 79106 Freiburg, Germany
|
||||
* Author: Martin Vogel <vogel@inttec.de>
|
||||
@@ -56,16 +56,16 @@ PROCEDURE Main()
|
||||
|
||||
ctinit()
|
||||
|
||||
? "Begin test of ChaRand()"
|
||||
? "Begin test of CharAnd()"
|
||||
?
|
||||
|
||||
// simple tests
|
||||
? "Simple tests:"
|
||||
|
||||
? ' ChaRand("012345678", Chr(254)) == "002244668" ? --> "' + ChaRand( "012345678", Chr( 254 ) ) + '"'
|
||||
? ' ChaRand("012345678", Chr(254)+Chr(252)) == "002044648" ? --> "' + ChaRand( "012345678", Chr( 254 ) + Chr( 252 ) ) + '"'
|
||||
? ' CharAnd("012345678", Chr(254)) == "002244668" ? --> "' + CharAnd( "012345678", Chr( 254 ) ) + '"'
|
||||
? ' CharAnd("012345678", Chr(254)+Chr(252)) == "002044648" ? --> "' + CharAnd( "012345678", Chr( 254 ) + Chr( 252 ) ) + '"'
|
||||
|
||||
? "End test of ChaRand()"
|
||||
? "End test of CharAnd()"
|
||||
?
|
||||
|
||||
ctexit()
|
||||
|
||||
@@ -64,9 +64,9 @@ PROCEDURE Main()
|
||||
// simple tests
|
||||
? "Simple tests:"
|
||||
? ' CharHist("Hello World !")' + "'109' == 3 ? --> ", CharHist( "Hello World !" )' 109 '
|
||||
? ' aeval(CharHist("Hello World !"), {| x | nTotal += x } ) '
|
||||
? ' AEval(CharHist("Hello World !"), {| x | nTotal += x } ) '
|
||||
AEval( CharHist( "Hello World !" ), {| x | nTotal += x } )
|
||||
? ' ==> nTotal == len("Hello World !") ? --> ', nTotal == Len( "Hello World !" )
|
||||
? ' ==> nTotal == Len("Hello World !") ? --> ', nTotal == Len( "Hello World !" )
|
||||
|
||||
? "End test of CharHist()"
|
||||
?
|
||||
|
||||
@@ -212,7 +212,7 @@ FUNCTION myerrhandler( oerr )
|
||||
? " err:severity.....:", oerr:severity
|
||||
? " err:subSystem....:", oerr:subSystem
|
||||
? " err:operation....:", oerr:operation
|
||||
? " len(err:args)....:", Len( oerr:args )
|
||||
? " Len(err:args)....:", Len( oerr:args )
|
||||
FOR ni := 1 TO Len( oerr:args )
|
||||
? " err:args[" + hb_ntos( ni ) + "]..:", oerr:args[ ni ]
|
||||
NEXT
|
||||
|
||||
@@ -82,7 +82,7 @@ PROCEDURE Main( cLang )
|
||||
"NToCDoW( nDay ) Returns name of day ", ;
|
||||
"NToCMonth( nMth ) Returns name of month ", ;
|
||||
"Quarter(date) Returns qtr number of date", ;
|
||||
"stod( ansi date) Returns Clipper date ", ;
|
||||
"SToD( ansi date) Returns Clipper date ", ;
|
||||
"Week( dDate, lSWN ) Returns numbef of week ", }
|
||||
|
||||
SET DATE ANSI
|
||||
@@ -893,7 +893,7 @@ FUNCTION lastdayomtest()
|
||||
@ 5, 10 SAY "LastDayOM(xDate) returns the number of days in the"
|
||||
@ 6, 10 SAY "month appearing in date. Or, if only a month number"
|
||||
@ 7, 10 SAY "is passed, in that month. Test it. "
|
||||
@ 9, 10 SAY "Insert a date(or)"
|
||||
@ 9, 10 SAY "Insert a Date(or)"
|
||||
@ 10, 10 SAY "a month"
|
||||
|
||||
@ 9, 30 GET dDate
|
||||
@@ -1136,7 +1136,7 @@ FUNCTION qtrtest()
|
||||
FUNCTION stodtest()
|
||||
|
||||
//
|
||||
// stod( ansi-date)
|
||||
// SToD( ansi-date)
|
||||
// ================
|
||||
// Returns a Clipper format date. If Ansi date is invalid, a
|
||||
// null date is returned.
|
||||
@@ -1148,7 +1148,7 @@ FUNCTION stodtest()
|
||||
LOCAL nKey
|
||||
|
||||
DO WHILE c
|
||||
@ 5, 10 SAY "stod( ansi-date ) receives an ANSI date string and"
|
||||
@ 5, 10 SAY "SToD( ansi-date ) receives an ANSI date string and"
|
||||
@ 6, 10 SAY "returns a Clipper format date"
|
||||
@ 8, 10 SAY "Enter an ANSI date string in the form YYYYMMDD"
|
||||
@ 8, 57 GET cAnsidate PICTURE "999999999" VALID chkansi( cAnsidate )
|
||||
@@ -1216,7 +1216,7 @@ FUNCTION weektest()
|
||||
// nWeek := Week( dDate, lSWN )
|
||||
// =============================
|
||||
// Returns the calendar week as a number. If no date is specified,
|
||||
// the system date is used. An empty date viz stod()
|
||||
// the system date is used. An empty date viz SToD()
|
||||
// returns 0.
|
||||
|
||||
LOCAL getlist := {}
|
||||
|
||||
@@ -65,7 +65,7 @@ PROCEDURE Main()
|
||||
? Str( Sqrt( n ), 20, 15 ) + ": " + Str( Mantissa( Sqrt( n ) ), 20, 15 ) + " " + Str( Exponent( Sqrt( n ) ), 4 )
|
||||
NEXT
|
||||
|
||||
// The call to str( Infinity(.T.) ), generate a GPF.
|
||||
// The call to Str( Infinity(.T.) ), generate a GPF.
|
||||
// ?? Str( Infinity( .T. ) ) + Str( Mantissa( Infinity( .T. ) ) ) + Str( Exponent( Infinity( .T. ) ) )
|
||||
// ?? Str( Infinity( .T. ) )
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ PROCEDURE Main()
|
||||
|
||||
#if 0
|
||||
? "Test with a MEMOEDITed string:"
|
||||
? " Now, a memoedit() will start. Please type a text, use tab characters"
|
||||
? " Now, a MemoEdit() will start. Please type a text, use tab characters"
|
||||
? " and make sure, you make use of soft and hard returns !"
|
||||
? " ...press any key to start the memoedit now..."
|
||||
?
|
||||
|
||||
@@ -73,41 +73,41 @@ PROCEDURE Main()
|
||||
?
|
||||
? "PI = " + Str( Pi(), 18, 15 )
|
||||
|
||||
? "STR( Sin( Pi() / 4 ), 18, 15 ) = 0.707106781186548 // CT3"
|
||||
? "Str( Sin( Pi() / 4 ), 18, 15 ) = 0.707106781186548 // CT3"
|
||||
? Space( 33 ) + Str( Sin( Pi() / 4 ), 18, 15 ) + " <-- CT for Harbour"
|
||||
?
|
||||
|
||||
? "STR( Sin( Pi() / 2 ), 18, 15 ) = 1.000000000000000 // CT3"
|
||||
? "Str( Sin( Pi() / 2 ), 18, 15 ) = 1.000000000000000 // CT3"
|
||||
? Space( 33 ) + Str( Sin( Pi() / 2 ), 18, 15 ) + " <-- CT for Harbour"
|
||||
?
|
||||
|
||||
? "STR( Sin( Pi() * 99.5 ), 18, 15 ) = -1.000000000000000 // CT3"
|
||||
? "Str( Sin( Pi() * 99.5 ), 18, 15 ) = -1.000000000000000 // CT3"
|
||||
? Space( 36 ) + Str( Sin( Pi() * 99.5 ), 18, 15 ) + " <-- CT for Harbour"
|
||||
?
|
||||
|
||||
? "STR( Sin( Pi() / 9 ), 18, 15 ) = 0.342020143325669 // CT3"
|
||||
? "Str( Sin( Pi() / 9 ), 18, 15 ) = 0.342020143325669 // CT3"
|
||||
? Space( 33 ) + Str( Sin( Pi() / 9 ), 18, 15 ) + " <-- CT for Harbour"
|
||||
|
||||
WAIT4()
|
||||
|
||||
|
||||
? "STR( Cos( 0 ), 18, 15 ) = 1.000000000000000 // CT3"
|
||||
? "Str( Cos( 0 ), 18, 15 ) = 1.000000000000000 // CT3"
|
||||
? Space( 26 ) + Str( Cos( 0 ), 18, 15 ) + " <-- CT for Harbour"
|
||||
?
|
||||
|
||||
? "STR( Cos( Pi() / 4 ), 18, 15 ) = 0.707106781186548 // CT3"
|
||||
? "Str( Cos( Pi() / 4 ), 18, 15 ) = 0.707106781186548 // CT3"
|
||||
? Space( 33 ) + Str( Cos( Pi() / 4 ), 18, 15 ) + " <-- CT for Harbour"
|
||||
?
|
||||
|
||||
? "STR( Cos( Pi() / 2 ), 18, 15 ) = 0.000000000000000 // CT3"
|
||||
? "Str( Cos( Pi() / 2 ), 18, 15 ) = 0.000000000000000 // CT3"
|
||||
? Space( 33 ) + Str( Cos( Pi() / 2 ), 18, 15 ) + " <-- CT for Harbour"
|
||||
?
|
||||
|
||||
? "STR( Cos( Pi() * 99.5 ), 18, 15 ) = 0.000000000000000 // CT3"
|
||||
? "Str( Cos( Pi() * 99.5 ), 18, 15 ) = 0.000000000000000 // CT3"
|
||||
? Space( 35 ) + Str( Cos( Pi() * 99.5 ), 18, 15 ) + " <-- CT for Harbour"
|
||||
?
|
||||
|
||||
? "STR( Cos( Pi() / 9 ), 18, 15 ) = 0.939692620785908 // CT3"
|
||||
? "Str( Cos( Pi() / 9 ), 18, 15 ) = 0.939692620785908 // CT3"
|
||||
? Space( 33 ) + Str( Cos( Pi() / 9 ), 18, 15 ) + " <-- CT for Harbour"
|
||||
?
|
||||
|
||||
@@ -115,44 +115,44 @@ PROCEDURE Main()
|
||||
WAIT4()
|
||||
|
||||
|
||||
? "STR( Tan( 0 ), 18, 15 ) = 1.000000000000000 // CT3 wrong ! "
|
||||
? "Str( Tan( 0 ), 18, 15 ) = 1.000000000000000 // CT3 wrong ! "
|
||||
? Space( 26 ) + Str( Tan( 0 ), 18, 15 ) + " <-- CT for Harbour"
|
||||
?
|
||||
|
||||
? "STR( Tan( Pi() / 4 ), 18, 15 ) = 1.000000000000000 // CT3"
|
||||
? "Str( Tan( Pi() / 4 ), 18, 15 ) = 1.000000000000000 // CT3"
|
||||
? Space( 33 ) + Str( Tan( Pi() / 4 ), 18, 15 ) + " <-- CT for Harbour"
|
||||
?
|
||||
|
||||
? "STR( Tan( Pi() / 9 ), 18, 15 ) = 0.363970234266202 // CT3"
|
||||
? "Str( Tan( Pi() / 9 ), 18, 15 ) = 0.363970234266202 // CT3"
|
||||
? Space( 33 ) + Str( Tan( Pi() / 9 ), 18, 15 ) + " <-- CT for Harbour"
|
||||
?
|
||||
?
|
||||
?
|
||||
|
||||
? "STR( ASin( 0.5 ), 18, 15 ) = 0.523598775598299 // CT3"
|
||||
? Space( 29 ) + Str( ASin( 0.5 ), 18, 15 ) + " <-- CT for Harbour"
|
||||
? "Str( Asin( 0.5 ), 18, 15 ) = 0.523598775598299 // CT3"
|
||||
? Space( 29 ) + Str( Asin( 0.5 ), 18, 15 ) + " <-- CT for Harbour"
|
||||
?
|
||||
|
||||
? "STR( ACos( 0.7 ), 18, 15 ) = 0.795398830184144 // CT3"
|
||||
? "Str( ACos( 0.7 ), 18, 15 ) = 0.795398830184144 // CT3"
|
||||
? Space( 29 ) + Str( ACos( 0.7 ), 18, 15 ) + " <-- CT for Harbour"
|
||||
?
|
||||
|
||||
? "STR( ATan( Pi() / 4 ), 18, 15 ) = 0.665773750028354 // CT3"
|
||||
? Space( 34 ) + Str( ATan( Pi() / 4 ), 18, 15 ) + " <-- CT for Harbour"
|
||||
? "Str( Atan( Pi() / 4 ), 18, 15 ) = 0.665773750028354 // CT3"
|
||||
? Space( 34 ) + Str( Atan( Pi() / 4 ), 18, 15 ) + " <-- CT for Harbour"
|
||||
?
|
||||
|
||||
WAIT4()
|
||||
|
||||
|
||||
? "STR( Cot( Pi() / 4 ), 18, 15 ) = 1.000000000000000 // CT3"
|
||||
? "Str( Cot( Pi() / 4 ), 18, 15 ) = 1.000000000000000 // CT3"
|
||||
? Space( 33 ) + Str( Cot( Pi() / 4 ), 18, 15 ) + " <-- CT for Harbour"
|
||||
?
|
||||
|
||||
? "STR( Cot( Pi() / 2 ), 18, 15 ) = 0.000000000000000 // CT3"
|
||||
? "Str( Cot( Pi() / 2 ), 18, 15 ) = 0.000000000000000 // CT3"
|
||||
? Space( 33 ) + Str( Cot( Pi() / 2 ), 18, 15 ) + " <-- CT for Harbour"
|
||||
?
|
||||
|
||||
? "STR( Cot( Pi() / 9 ), 18, 15 ) = 2.747477419454622 // CT3"
|
||||
? "Str( Cot( Pi() / 9 ), 18, 15 ) = 2.747477419454622 // CT3"
|
||||
? Space( 33 ) + Str( Cot( Pi() / 9 ), 18, 15 ) + " <-- CT for Harbour"
|
||||
?
|
||||
|
||||
@@ -160,30 +160,30 @@ PROCEDURE Main()
|
||||
|
||||
?? "Testing Hiperbolic Sine..."
|
||||
?
|
||||
? "STR( Sinh( Pi() / 2 ), 18, 15 ) = 2.301298902307295 // CT3"
|
||||
? "Str( Sinh( Pi() / 2 ), 18, 15 ) = 2.301298902307295 // CT3"
|
||||
? Space( 34 ) + Str( Sinh( Pi() / 2 ), 18, 15 ) + " <-- CT for Harbour"
|
||||
?
|
||||
|
||||
? "STR( Sinh( Pi() / 4 ), 18, 15 ) = 0.868670961486010 // CT3"
|
||||
? "Str( Sinh( Pi() / 4 ), 18, 15 ) = 0.868670961486010 // CT3"
|
||||
? Space( 34 ) + Str( Sinh( Pi() / 4 ), 18, 15 ) + " <-- CT for Harbour"
|
||||
?
|
||||
|
||||
? "Testing Hiperbolic Cosine..."
|
||||
?
|
||||
? "STR( Cosh( Pi() / 2 ), 18, 15 ) = 2.509178478658057 // CT3"
|
||||
? "Str( Cosh( Pi() / 2 ), 18, 15 ) = 2.509178478658057 // CT3"
|
||||
? Space( 34 ) + Str( Cosh( Pi() / 2 ), 18, 15 ) + " <-- CT for Harbour"
|
||||
?
|
||||
|
||||
? "STR( Cosh( Pi() / 4 ), 18, 15 ) = 1.324609089252006 // CT3"
|
||||
? "Str( Cosh( Pi() / 4 ), 18, 15 ) = 1.324609089252006 // CT3"
|
||||
? Space( 34 ) + Str( Cosh( Pi() / 4 ), 18, 15 ) + " <-- CT for Harbour"
|
||||
?
|
||||
|
||||
? "Testing Hiperbolic Tangent..."
|
||||
?
|
||||
? "STR( Tanh( Pi() / 2 ), 18, 15 ) = 0.917152335667274 // CT3"
|
||||
? "Str( Tanh( Pi() / 2 ), 18, 15 ) = 0.917152335667274 // CT3"
|
||||
? Space( 34 ) + Str( Tanh( Pi() / 2 ), 18, 15 ) + " <-- CT for Harbour"
|
||||
?
|
||||
? "STR( Tanh( Pi() / 4 ), 18, 15 ) = 0.655794202632672 // CT3"
|
||||
? "Str( Tanh( Pi() / 4 ), 18, 15 ) = 0.655794202632672 // CT3"
|
||||
? Space( 34 ) + Str( Tanh( Pi() / 4 ), 18, 15 ) + " <-- CT for Harbour"
|
||||
?
|
||||
|
||||
@@ -191,23 +191,23 @@ PROCEDURE Main()
|
||||
|
||||
? "Testing Degree TO Radian..."
|
||||
?
|
||||
? "STR( DToR( 360 ), 18, 15 ) = 6.283185307179588 // CT3"
|
||||
? "Str( DToR( 360 ), 18, 15 ) = 6.283185307179588 // CT3"
|
||||
? Space( 28 ) + Str( DToR( 360 ), 18, 15 ), " <-- CT for Harbour "
|
||||
?
|
||||
|
||||
? "STR( DToR( 180 ), 18, 15 ) = 3.141592653589794 // CT3"
|
||||
? "Str( DToR( 180 ), 18, 15 ) = 3.141592653589794 // CT3"
|
||||
? Space( 28 ) + Str( DToR( 180 ), 18, 15 ), " <-- CT for Harbour "
|
||||
?
|
||||
|
||||
? "STR( DToR( 180.5 ), 18, 15 ) = 3.150319299849766 // CT3"
|
||||
? "Str( DToR( 180.5 ), 18, 15 ) = 3.150319299849766 // CT3"
|
||||
? Space( 30 ) + Str( DToR( 180.5 ), 18, 15 ), " <-- CT for Harbour "
|
||||
?
|
||||
|
||||
? "STR( DToR( 720 ), 18, 15 ) = 12.566370614359180 // CT3"
|
||||
? "Str( DToR( 720 ), 18, 15 ) = 12.566370614359180 // CT3"
|
||||
? Space( 29 ) + Str( DToR( 720 ), 18, 15 ), " <-- CT for Harbour "
|
||||
?
|
||||
|
||||
? "STR( DToR( -180 ), 18, 15 ) = -3.141592653589794 // CT3"
|
||||
? "Str( DToR( -180 ), 18, 15 ) = -3.141592653589794 // CT3"
|
||||
? Space( 30 ) + Str( DToR( -180 ), 18, 15 ), " <-- CT for Harbour "
|
||||
|
||||
WAIT4()
|
||||
@@ -243,7 +243,7 @@ PROCEDURE Main()
|
||||
? "x = Sin( DToR( 30 ) ) =", x
|
||||
? "y = Cos( DToR( 30 ) ) =", y
|
||||
?
|
||||
? "STR( Atn2( x, y ), 18, 15 ) = 0.523598775598299 // CT3"
|
||||
? "Str( Atn2( x, y ), 18, 15 ) = 0.523598775598299 // CT3"
|
||||
? Space( 30 ) + Str( Atn2( x, y ), 18, 15 ) + " <-- CT for Harbour"
|
||||
?
|
||||
? "RToD( Atn2( x, y ) ) =" + Str( RToD( Atn2( x, y ) ), 18, 4 ) + " <-- CT for Harbour"
|
||||
|
||||
@@ -540,7 +540,7 @@
|
||||
$ONELINER$
|
||||
Save a GD image.
|
||||
$SYNTAX$
|
||||
gdImageGd( <pImage>, <cFile> | <nHandle> ) --> NIL
|
||||
gdImageGD( <pImage>, <cFile> | <nHandle> ) --> NIL
|
||||
$ARGUMENTS$
|
||||
<pImage> - Image pointer
|
||||
<cFile> - Image file name
|
||||
@@ -548,22 +548,22 @@
|
||||
$RETURNS$
|
||||
NIL
|
||||
$DESCRIPTION$
|
||||
gdImageGd() saves a GD image to a file or a handle.
|
||||
gdImageGD() saves a GD image to a file or a handle.
|
||||
|
||||
You can use one of 2 syntax:
|
||||
|
||||
gdImageGd( pImage, "myimage.gd" )
|
||||
gdImageGD( pImage, "myimage.gd" )
|
||||
|
||||
or
|
||||
|
||||
gdImageGd( pImage, nFileHandle )
|
||||
gdImageGD( pImage, nFileHandle )
|
||||
|
||||
$EXAMPLES$
|
||||
PROCEDURE Main()
|
||||
LOCAL pImage := gdImageFromGif( "myimage.gif" )
|
||||
|
||||
// Image conversion
|
||||
gdImageGd( pImage, "myimage.gd" )
|
||||
gdImageGD( pImage, "myimage.gd" )
|
||||
|
||||
RETURN
|
||||
$STATUS$
|
||||
|
||||
@@ -4,32 +4,32 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
GT_ASCPOS()
|
||||
gt_AscPos()
|
||||
$CATEGORY$
|
||||
String Tools
|
||||
$ONELINER$
|
||||
Return the ascii value of a specified character in a string
|
||||
$SYNTAX$
|
||||
GT_Ascpos(<cStr>, <nPos>) --> nAscVal
|
||||
gt_AscPos(<cStr>, <nPos>) --> nAscVal
|
||||
$ARGUMENTS$
|
||||
<cStr> - The string
|
||||
<nPos> - The position in <cStr>
|
||||
$RETURNS$
|
||||
<nAscVal> - The ascii value of substr(<cStr>, <nPos>, 1)
|
||||
<nAscVal> - The ascii value of SubStr(<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)
|
||||
Asc(SubStr(cStr, nPos, 1)
|
||||
|
||||
NOTE:
|
||||
invalid parameters will return -1
|
||||
nPos > len(cStr) will return -2
|
||||
nPos > Len(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
|
||||
I process contain embedded NULs.
|
||||
$EXAMPLES$
|
||||
? gt_ascpos( "the cat sat on the mat", 3 ) // prints e
|
||||
? gt_AscPos( "the cat sat on the mat", 3 ) // prints e
|
||||
$TESTS$
|
||||
|
||||
$STATUS$
|
||||
@@ -45,13 +45,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
GT_ASCIISUM()
|
||||
gt_AsciiSum()
|
||||
$CATEGORY$
|
||||
String Tools
|
||||
$ONELINER$
|
||||
Sum the ascii values in a string.
|
||||
$SYNTAX$
|
||||
GT_AsciiSum(<cStr>) --> nSum
|
||||
gt_AsciiSum(<cStr>) --> nSum
|
||||
$ARGUMENTS$
|
||||
<cStr> - The string to sum
|
||||
$RETURNS$
|
||||
@@ -76,13 +76,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
GT_ATDIFF()
|
||||
gt_AtDiff()
|
||||
$CATEGORY$
|
||||
String Tools
|
||||
$ONELINER$
|
||||
Return the position where two strings begin to differ
|
||||
$SYNTAX$
|
||||
GT_AtDiff(<cStr1>, <cStr2>) --> nPos
|
||||
gt_AtDiff(<cStr1>, <cStr2>) --> nPos
|
||||
$ARGUMENTS$
|
||||
<cStr1> - A character string to compare
|
||||
<cStr2> - The string to compare with
|
||||
@@ -90,15 +90,15 @@
|
||||
<nPos> - The position in <cStr2> where <cStr1> begins to differ
|
||||
$DESCRIPTION$
|
||||
Return the position in <cStr2> where <cStr1> begins to differ.
|
||||
If the strings differ in the first character GT_AtDiff() will
|
||||
If the strings differ in the first character gt_AtDiff() will
|
||||
return 1. If the two strings are identical (or identical upto
|
||||
the last character in <cStr2>) the function will return 0.
|
||||
|
||||
NOTE:
|
||||
invalid parameters will return -1
|
||||
$EXAMPLES$
|
||||
? gt_atDiff( "the cat", "the rat" ) // prints 5
|
||||
? gt_atDiff( "the cat", "the " ) // prints 0
|
||||
? gt_AtDiff( "the cat", "the rat" ) // prints 5
|
||||
? gt_AtDiff( "the cat", "the " ) // prints 0
|
||||
$TESTS$
|
||||
|
||||
$STATUS$
|
||||
@@ -114,13 +114,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
GT_CHAREVEN()
|
||||
gt_CharEven()
|
||||
$CATEGORY$
|
||||
String Tools
|
||||
$ONELINER$
|
||||
Return a string of all the characters in even positions
|
||||
$SYNTAX$
|
||||
GT_CharEven(<cStr>) --> cRet
|
||||
gt_CharEven(<cStr>) --> cRet
|
||||
$ARGUMENTS$
|
||||
<cStr> - A character string to extract chars from
|
||||
$RETURNS$
|
||||
@@ -148,13 +148,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
GT_CHARMIX()
|
||||
gt_CharMix()
|
||||
$CATEGORY$
|
||||
String Tools
|
||||
$ONELINER$
|
||||
Amalgamate two strings to form the return value
|
||||
$SYNTAX$
|
||||
GT_CharMix(<cStr1>, <cStr2>) --> cRet
|
||||
gt_CharMix(<cStr1>, <cStr2>) --> cRet
|
||||
$ARGUMENTS$
|
||||
<cStr1> - A character string to mix
|
||||
<cStr2> - A character string to mix with
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
AMONTHS()
|
||||
AMonths()
|
||||
$CATEGORY$
|
||||
Date
|
||||
$ONELINER$
|
||||
Returns an array with the months names.
|
||||
$SYNTAX$
|
||||
AMONTHS() --> aMonths
|
||||
AMonths() --> aMonths
|
||||
$ARGUMENTS$
|
||||
None
|
||||
$RETURNS$
|
||||
@@ -70,13 +70,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
ISLEAPYEAR()
|
||||
IsLeapYear()
|
||||
$CATEGORY$
|
||||
Date
|
||||
$ONELINER$
|
||||
Checks if the given date is a leap year.
|
||||
$SYNTAX$
|
||||
ISLEAPYEAR( <dDate> ) --> lTrueOrFalse
|
||||
IsLeapYear( <dDate> ) --> lTrueOrFalse
|
||||
$ARGUMENTS$
|
||||
<dDate> A valid date.
|
||||
$RETURNS$
|
||||
@@ -96,19 +96,19 @@
|
||||
$FILES$
|
||||
Library is libmisc
|
||||
$SEEALSO$
|
||||
DAYSINMONTH()
|
||||
DaysInMonth()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
DAYSINMONTH()
|
||||
DaysInMonth()
|
||||
$CATEGORY$
|
||||
Date
|
||||
$ONELINER$
|
||||
Gets the days in a month.
|
||||
$SYNTAX$
|
||||
DAYSINMONTH( <dDate> ) --> nDays
|
||||
DaysInMonth( <dDate> ) --> nDays
|
||||
$ARGUMENTS$
|
||||
<dDate> A valid date.
|
||||
$RETURNS$
|
||||
@@ -133,13 +133,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
EOM()
|
||||
EoM()
|
||||
$CATEGORY$
|
||||
Date
|
||||
$ONELINER$
|
||||
Gets the last day in a month.
|
||||
$SYNTAX$
|
||||
EOM( <dDate> ) --> dEOM
|
||||
EoM( <dDate> ) --> dEOM
|
||||
$ARGUMENTS$
|
||||
<dDate> A valid date.
|
||||
$RETURNS$
|
||||
@@ -148,8 +148,8 @@
|
||||
This function returns the last day of a given month date.
|
||||
$EXAMPLES$
|
||||
SET DATE ANSI
|
||||
? 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$
|
||||
@@ -159,19 +159,19 @@
|
||||
$FILES$
|
||||
Library is libmisc
|
||||
$SEEALSO$
|
||||
BOM(),WOM()
|
||||
BoM(),WoM()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
BOM()
|
||||
BoM()
|
||||
$CATEGORY$
|
||||
Date
|
||||
$ONELINER$
|
||||
Gets the first day in a month.
|
||||
$SYNTAX$
|
||||
BOM( <dDate> ) --> dBOM
|
||||
BoM( <dDate> ) --> dBOM
|
||||
$ARGUMENTS$
|
||||
<dDate> A valid date.
|
||||
$RETURNS$
|
||||
@@ -180,8 +180,8 @@
|
||||
This function returns the first day of a given month date.
|
||||
$EXAMPLES$
|
||||
SET DATE ANSI
|
||||
? 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$
|
||||
@@ -191,19 +191,19 @@
|
||||
$FILES$
|
||||
Library is libmisc
|
||||
$SEEALSO$
|
||||
EOM(),WOM()
|
||||
EoM(),WoM()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
DOY()
|
||||
DoY()
|
||||
$CATEGORY$
|
||||
Date
|
||||
$ONELINER$
|
||||
Gets the day number of the year.
|
||||
$SYNTAX$
|
||||
DOY( <dDate> ) --> nDay
|
||||
DoY( <dDate> ) --> nDay
|
||||
$ARGUMENTS$
|
||||
<dDate> A valid date.
|
||||
$RETURNS$
|
||||
@@ -211,8 +211,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$
|
||||
@@ -222,19 +222,19 @@
|
||||
$FILES$
|
||||
Library is libmisc
|
||||
$SEEALSO$
|
||||
WOY()
|
||||
WoY()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
WOY()
|
||||
WoY()
|
||||
$CATEGORY$
|
||||
Date
|
||||
$ONELINER$
|
||||
Gets the week number of the year.
|
||||
$SYNTAX$
|
||||
WOY( <dDate>, <lIso> ) --> nWeek
|
||||
WoY( <dDate>, <lIso> ) --> nWeek
|
||||
$ARGUMENTS$
|
||||
<dDate> A valid date.
|
||||
$RETURNS$
|
||||
@@ -245,8 +245,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$
|
||||
@@ -256,19 +256,19 @@
|
||||
$FILES$
|
||||
Library is libmisc
|
||||
$SEEALSO$
|
||||
DOY()
|
||||
DoY()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
EOY()
|
||||
EoY()
|
||||
$CATEGORY$
|
||||
Date
|
||||
$ONELINER$
|
||||
Gets the last date of the year.
|
||||
$SYNTAX$
|
||||
EOY( <dDate> ) --> dEOY
|
||||
EoY( <dDate> ) --> dEOY
|
||||
$ARGUMENTS$
|
||||
<dDate> A valid date.
|
||||
$RETURNS$
|
||||
@@ -277,8 +277,8 @@
|
||||
This function returns the last date of a given year date.
|
||||
$EXAMPLES$
|
||||
SET DATE ANSI
|
||||
? 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$
|
||||
@@ -288,19 +288,19 @@
|
||||
$FILES$
|
||||
Library is libmisc
|
||||
$SEEALSO$
|
||||
BOY()
|
||||
BoY()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
BOY()
|
||||
BoY()
|
||||
$CATEGORY$
|
||||
Date
|
||||
$ONELINER$
|
||||
Gets the first date of the year.
|
||||
$SYNTAX$
|
||||
BOY( <dDate> ) --> dBOY
|
||||
BoY( <dDate> ) --> dBOY
|
||||
$ARGUMENTS$
|
||||
<dDate> A valid date.
|
||||
$RETURNS$
|
||||
@@ -309,8 +309,8 @@
|
||||
This function returns the first date of a given year date.
|
||||
$EXAMPLES$
|
||||
SET DATE ANSI
|
||||
? 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$
|
||||
@@ -320,6 +320,6 @@
|
||||
$FILES$
|
||||
Library is libmisc
|
||||
$SEEALSO$
|
||||
EOY()
|
||||
EoY()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
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
|
||||
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
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
ISBIN()
|
||||
IsBin()
|
||||
$CATEGORY$
|
||||
Conversion Tools
|
||||
$ONELINER$
|
||||
Check if the value is a Binary Number
|
||||
$SYNTAX$
|
||||
ISBIN(<cN>) -><cNr>
|
||||
IsBin(<cN>) -><cNr>
|
||||
$ARGUMENTS$
|
||||
<cN> STRING TO BE CHECKED
|
||||
$RETURNS$
|
||||
@@ -20,19 +20,19 @@
|
||||
$FILES$
|
||||
Library is libmisc
|
||||
$SEEALSO$
|
||||
ISOCTAL(),ISDEC(),ISHEXA()
|
||||
IsOctal(),IsDec(),IsHexa()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
ISOCTAL()
|
||||
IsOctal()
|
||||
$CATEGORY$
|
||||
Conversion Tools
|
||||
$ONELINER$
|
||||
Check if the value is a Octal Number
|
||||
$SYNTAX$
|
||||
ISOCTAL(<cN>) -><cNr>
|
||||
IsOctal(<cN>) -><cNr>
|
||||
$ARGUMENTS$
|
||||
<cN> STRING TO BE CHECKED
|
||||
$RETURNS$
|
||||
@@ -42,19 +42,19 @@
|
||||
$FILES$
|
||||
Library is libmisc
|
||||
$SEEALSO$
|
||||
ISBIN(),ISDEC(),ISHEXA()
|
||||
IsBin(),IsDec(),IsHexa()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
ISDEC()
|
||||
IsDec()
|
||||
$CATEGORY$
|
||||
Conversion Tools
|
||||
$ONELINER$
|
||||
Check if the value is a Decimal Number
|
||||
$SYNTAX$
|
||||
ISDEC(<cN>) -><cNr>
|
||||
IsDec(<cN>) -><cNr>
|
||||
$ARGUMENTS$
|
||||
<cN> STRING TO BE CHECKED
|
||||
$RETURNS$
|
||||
@@ -64,19 +64,19 @@
|
||||
$FILES$
|
||||
Library is libmisc
|
||||
$SEEALSO$
|
||||
ISOCTAL(),ISBIN(),ISHEXA()
|
||||
IsOctal(),IsBin(),IsHexa()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
ISHEXA()
|
||||
IsHexa()
|
||||
$CATEGORY$
|
||||
Conversion Tools
|
||||
$ONELINER$
|
||||
Check if the value is a Hexal Number
|
||||
$SYNTAX$
|
||||
ISHEXA(<cN>) -><cNr>
|
||||
IsHexa(<cN>) -><cNr>
|
||||
$ARGUMENTS$
|
||||
<cN> STRING TO BE CHECKED
|
||||
$RETURNS$
|
||||
@@ -86,19 +86,19 @@
|
||||
$FILES$
|
||||
Library is libmisc
|
||||
$SEEALSO$
|
||||
ISOCTAL(),ISDEC(),ISBIN()
|
||||
IsOctal(),IsDec(),IsBin()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
DECTOBIN()
|
||||
DecToBin()
|
||||
$CATEGORY$
|
||||
Conversion Tools
|
||||
$ONELINER$
|
||||
Converts a Decimal Value to Binary
|
||||
$SYNTAX$
|
||||
DECTOBIN(<cN>) -><cNr>
|
||||
DecToBin(<cN>) -><cNr>
|
||||
$ARGUMENTS$
|
||||
<cN> NUMBER TO BE CONVERTED
|
||||
$RETURNS$
|
||||
@@ -109,19 +109,19 @@
|
||||
$FILES$
|
||||
Library is libmisc
|
||||
$SEEALSO$
|
||||
Dectohexa(),dectooctal()
|
||||
DecToHexa(),DecToOctal()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
DECTOOCTAL()
|
||||
DecToOctal()
|
||||
$CATEGORY$
|
||||
Conversion Tools
|
||||
$ONELINER$
|
||||
Converts a Decimal Value to Octal
|
||||
$SYNTAX$
|
||||
DECTOOCTAL(<cN>) -><cNr>
|
||||
DecToOctal(<cN>) -><cNr>
|
||||
$ARGUMENTS$
|
||||
<cN> NUMBER TO BE CONVERTED
|
||||
$RETURNS$
|
||||
@@ -132,19 +132,19 @@
|
||||
$FILES$
|
||||
Library is libmisc
|
||||
$SEEALSO$
|
||||
Dectohexa(),dectobin()
|
||||
DecToHexa(),DecToBin()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
DECTOHEXA()
|
||||
DecToHexa()
|
||||
$CATEGORY$
|
||||
Conversion Tools
|
||||
$ONELINER$
|
||||
Converts a Decimal Value to Hexa
|
||||
$SYNTAX$
|
||||
DECTOHEXA(<cN>) -><cNr>
|
||||
DecToHexa(<cN>) -><cNr>
|
||||
$ARGUMENTS$
|
||||
<cN> NUMBER TO BE CONVERTED
|
||||
$RETURNS$
|
||||
@@ -155,19 +155,19 @@
|
||||
$FILES$
|
||||
Library is libmisc
|
||||
$SEEALSO$
|
||||
Dectobin(),dectooctal()
|
||||
DecToBin(),DecToOctal()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
BINTODEC()
|
||||
BinToDec()
|
||||
$CATEGORY$
|
||||
Conversion Tools
|
||||
$ONELINER$
|
||||
Converts a Binary Value to Decimal
|
||||
$SYNTAX$
|
||||
BIntODEC(<cN>) -><cNr>
|
||||
BinToDec(<cN>) -><cNr>
|
||||
$ARGUMENTS$
|
||||
<cN> NUMBER TO BE CONVERTED
|
||||
$RETURNS$
|
||||
@@ -178,19 +178,19 @@
|
||||
$FILES$
|
||||
Library is libmisc
|
||||
$SEEALSO$
|
||||
OctaltoDec(),HexatoDec()
|
||||
OctalToDec(),HexaToDec()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
OCTALTODEC()
|
||||
OctalToDec()
|
||||
$CATEGORY$
|
||||
Conversion Tools
|
||||
$ONELINER$
|
||||
Converts a Octal Value to Decimal
|
||||
$SYNTAX$
|
||||
OCTALTODEC(<cN>) -><cNr>
|
||||
OctalToDec(<cN>) -><cNr>
|
||||
$ARGUMENTS$
|
||||
<cN> NUMBER TO BE CONVERTED
|
||||
$RETURNS$
|
||||
@@ -201,19 +201,19 @@
|
||||
$FILES$
|
||||
Library is libmisc
|
||||
$SEEALSO$
|
||||
BintoDec(),HexatoDec()
|
||||
BinToDec(),HexaToDec()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
HEXATODEC()
|
||||
HexaToDec()
|
||||
$CATEGORY$
|
||||
Conversion Tools
|
||||
$ONELINER$
|
||||
Converts a Hexa Value to Decimal
|
||||
$SYNTAX$
|
||||
HEXATODEC(<cN>) -><cNr>
|
||||
HexaToDec(<cN>) -><cNr>
|
||||
$ARGUMENTS$
|
||||
<cN> NUMBER TO BE CONVERTED
|
||||
$RETURNS$
|
||||
@@ -224,6 +224,6 @@
|
||||
$FILES$
|
||||
Library is libmisc
|
||||
$SEEALSO$
|
||||
OctaltoDec(),BintoDec()
|
||||
OctalToDec(),BinToDec()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
PROCEDURE Main()
|
||||
LOCAL oHtm
|
||||
|
||||
oHtm := THTML():New( "www\harbour.html" )
|
||||
oHtm := THtml():New( "www\harbour.html" )
|
||||
oHtm:WriteTitle( "Harbour Reference Guide" )
|
||||
oHtm:WritePar( "HARBOUR" )
|
||||
oHtm:WriteLink( "OverView" )
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_AADDITION()
|
||||
ft_AAddition()
|
||||
$CATEGORY$
|
||||
Array
|
||||
$ONELINER$
|
||||
Add elements unique of source array to target array
|
||||
$SYNTAX$
|
||||
FT_AADDITION( <aList1>, <aList2> [, <lTrimmer> [, <lCaseSens> ] ] ) ;
|
||||
ft_AAddition( <aList1>, <aList2> [, <lTrimmer> [, <lCaseSens> ] ] ) ;
|
||||
-> aNewArray
|
||||
$ARGUMENTS$
|
||||
<aList1> is the primary array.
|
||||
@@ -35,15 +35,15 @@
|
||||
aList1 := { "apple", "orange", "pear" }
|
||||
aList2 := { "apple ", "banana", "PEAR" }
|
||||
|
||||
FT_AADDITION( aList1, aList2 )
|
||||
ft_AAddition( aList1, aList2 )
|
||||
// ignores spaces, sensitive to case
|
||||
// returns { "apple", "orange", "pear", "banana", "PEAR" }
|
||||
|
||||
FT_AADDITION( aList1, aList2, , .F. )
|
||||
ft_AAddition( aList1, aList2, , .F. )
|
||||
// ignores spaces, not sensitive to case
|
||||
// returns { "apple", "orange", "pear", "banana" }
|
||||
|
||||
FT_AADDITION( aList1, aList2, .F. , .F. )
|
||||
ft_AAddition( aList1, aList2, .F. , .F. )
|
||||
// sensitive to spaces, not sensitive to case
|
||||
// returns { "apple", "orange", "pear", "apple ", "banana" }
|
||||
$END$
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_AAVG()
|
||||
ft_AAvg()
|
||||
$CATEGORY$
|
||||
Array
|
||||
$ONELINER$
|
||||
Average numeric values in an array
|
||||
$SYNTAX$
|
||||
FT_AAVG( <aArray> [, <nStartIndex> [, <nEndIndex> ] ] ) -> nAverage
|
||||
ft_AAvg( <aArray> [, <nStartIndex> [, <nEndIndex> ] ] ) -> nAverage
|
||||
$ARGUMENTS$
|
||||
<aArray> is the array containing the elements to be averaged.
|
||||
|
||||
@@ -25,14 +25,14 @@
|
||||
This function is used to get a numeric average of selected or all
|
||||
elements of an array.
|
||||
|
||||
This routine requires FT_ASUM().
|
||||
This routine requires ft_ASum().
|
||||
$EXAMPLES$
|
||||
FT_AAVG( aSubTotals ) // Get Average of Entire Array
|
||||
ft_AAvg( aSubTotals ) // Get Average of Entire Array
|
||||
|
||||
FT_AAVG( aSubTotals, 5 ) // Get Average of 5th Element On
|
||||
ft_AAvg( aSubTotals, 5 ) // Get Average of 5th Element On
|
||||
|
||||
FT_AAVG( aSubTotals, , 10 ) // Get Average of 1st 10 Elements
|
||||
ft_AAvg( aSubTotals, , 10 ) // Get Average of 1st 10 Elements
|
||||
|
||||
FT_AAVG( aSubTotals, 5, 10 ) // Get Average of Elements 5-10
|
||||
ft_AAvg( aSubTotals, 5, 10 ) // Get Average of Elements 5-10
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_ACCTADJ()
|
||||
ft_AcctAdj()
|
||||
$CATEGORY$
|
||||
Date/Time
|
||||
$ONELINER$
|
||||
Adjust beginning or ending fiscal pd. dates to acctg. dates
|
||||
$SYNTAX$
|
||||
FT_ACCTADJ( [ <dGivenDate> ], [ <lIsEnd> ] ) -> dDate
|
||||
ft_AcctAdj( [ <dGivenDate> ], [ <lIsEnd> ] ) -> dDate
|
||||
$ARGUMENTS$
|
||||
<dGivenDate> is any valid date in any valid format.
|
||||
Defaults to DATE() if not supplied.
|
||||
Defaults to Date() if not supplied.
|
||||
|
||||
<lIsEnd> is a logical variable. .F. = adjust for beginning of
|
||||
period mode, .T. = adjust for end of period mode. Defaults to
|
||||
@@ -42,19 +42,19 @@
|
||||
Beginning of period mode (lIsEnd == .F.)
|
||||
|
||||
dDate := SToD( "19910131" ) // In last 3 days of work week
|
||||
? FT_ACCTADJ( dDate ) // 1991.02.03 (next week's start)
|
||||
? ft_AcctAdj( dDate ) // 1991.02.03 (next week's start)
|
||||
|
||||
dDate := SToD( "19910331" ) // Not in last 3 days of work week
|
||||
? FT_ACCTADJ( dDate ) // 1991.03.31 (this week's start)
|
||||
? ft_AcctAdj( dDate ) // 1991.03.31 (this week's start)
|
||||
|
||||
End of period mode (lIsEnd == .T.)
|
||||
|
||||
dDate := SToD( "19910131" ) // In last 4 days of work week
|
||||
? FT_ACCTADJ( dDate, .T. ) // 1991.02.02 (this week's end)
|
||||
? ft_AcctAdj( dDate, .T. ) // 1991.02.02 (this week's end)
|
||||
|
||||
dDate := SToD( "19910331" ) // Not in last 4 days of work week
|
||||
? FT_ACCTADJ( dDate, .T. ) // 1991.03.30 (prior week's end)
|
||||
? ft_AcctAdj( dDate, .T. ) // 1991.03.30 (prior week's end)
|
||||
$SEEALSO$
|
||||
FT_DATECNFG() FT_DAYTOBOW()
|
||||
ft_DateCnfg() ft_DayToBoW()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_ACCTMONTH()
|
||||
ft_AcctMonth()
|
||||
$CATEGORY$
|
||||
Date/Time
|
||||
$ONELINER$
|
||||
Return accounting month data
|
||||
$SYNTAX$
|
||||
FT_ACCTMONTH( [ <dGivenDate> ], [ <nMonthNum> ] ) -> aDateInfo
|
||||
ft_AcctMonth( [ <dGivenDate> ], [ <nMonthNum> ] ) -> aDateInfo
|
||||
$ARGUMENTS$
|
||||
<dGivenDate> is any valid date in any date format. Defaults
|
||||
to current system date if not supplied.
|
||||
@@ -24,7 +24,7 @@
|
||||
aDateInfo[ 2 ] - The beginning date of the accounting month
|
||||
aDateInfo[ 3 ] - The ending date of the accounting month
|
||||
$DESCRIPTION$
|
||||
FT_ACCTMONTH() creates an array containing data about the
|
||||
ft_AcctMonth() creates an array containing data about the
|
||||
accounting month containing the given date.
|
||||
|
||||
An accounting period has the following characteristics:
|
||||
@@ -41,17 +41,17 @@
|
||||
weeks.
|
||||
$EXAMPLES$
|
||||
// get info about accounting month containing 9/15/90
|
||||
aDateInfo := FT_ACCTMONTH( SToD( "19900915" ) )
|
||||
aDateInfo := ft_AcctMonth( SToD( "19900915" ) )
|
||||
? aDateInfo[ 1 ] // 199009 (9th month)
|
||||
? aDateInfo[ 2 ] // 09/02/90 beginning of month 9
|
||||
? aDateInfo[ 3 ] // 09/29/90 end of month 9
|
||||
|
||||
// get info about accounting month 5 in year containing 9/15/90
|
||||
aDateInfo := FT_ACCTMONTH( SToD( "19900915" ), 5 )
|
||||
aDateInfo := ft_AcctMonth( SToD( "19900915" ), 5 )
|
||||
? aDateInfo[ 1 ] // 199005
|
||||
? aDateInfo[ 2 ] // 04/29/89 beginning of month 5
|
||||
? aDateInfo[ 3 ] // 06/02/90 end of month 5
|
||||
$SEEALSO$
|
||||
FT_DATECNFG() FT_ACCTWEEK() FT_ACCTQTR() FT_ACCTYEAR()
|
||||
ft_DateCnfg() ft_AcctWeek() ft_AcctQtr() ft_AcctYear()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_ACCTQTR()
|
||||
ft_AcctQtr()
|
||||
$CATEGORY$
|
||||
Date/Time
|
||||
$ONELINER$
|
||||
Return accounting quarter data
|
||||
$SYNTAX$
|
||||
FT_ACCTQTR( [ <dGivenDate> ], [ <nQtrNum> ] ) -> aDateinfo
|
||||
ft_AcctQtr( [ <dGivenDate> ], [ <nQtrNum> ] ) -> aDateinfo
|
||||
$ARGUMENTS$
|
||||
<dGivenDate> is any valid date in any date format. Defaults
|
||||
to current system date if not supplied.
|
||||
@@ -24,7 +24,7 @@
|
||||
aDateInfo[ 2 ] - The beginning date of the accounting quarter
|
||||
aDateInfo[ 3 ] - The ending date of the accounting quarter
|
||||
$DESCRIPTION$
|
||||
FT_ACCTQTR() creates an array containing data about the
|
||||
ft_AcctQtr() creates an array containing data about the
|
||||
accounting quarter containing the given date.
|
||||
|
||||
An accounting period has the following characteristics:
|
||||
@@ -41,17 +41,17 @@
|
||||
weeks.
|
||||
$EXAMPLES$
|
||||
// get info about accounting month containing 9/15/90
|
||||
aDateInfo := FT_ACCTQTR( SToD( "19900915" ) )
|
||||
aDateInfo := ft_AcctQtr( SToD( "19900915" ) )
|
||||
? aDateInfo[ 1 ] // 199003 (3rd quarter)
|
||||
? aDateInfo[ 2 ] // 07/01/90 beginning of quarter 3
|
||||
? aDateInfo[ 3 ] // 09/29/90 end of quarter 3
|
||||
|
||||
// get info about accounting qtr. 2 in year containing 9/15/90
|
||||
aDateInfo := FT_ACCTQTR( SToD( "19900915" ), 2 )
|
||||
aDateInfo := ft_AcctQtr( SToD( "19900915" ), 2 )
|
||||
? aDateInfo[ 1 ] // 199002
|
||||
? aDateInfo[ 2 ] // 04/01/89 beginning of quarter 2
|
||||
? aDateInfo[ 3 ] // 06/30/90 end of quarter 2
|
||||
$SEEALSO$
|
||||
FT_DATECNFG() FT_ACCTWEEK() FT_ACCTMONTH() FT_ACCTYEAR()
|
||||
ft_DateCnfg() ft_AcctWeek() ft_AcctMonth() ft_AcctYear()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_ACCTWEEK()
|
||||
ft_AcctWeek()
|
||||
$CATEGORY$
|
||||
Date/Time
|
||||
$ONELINER$
|
||||
Return accounting week data
|
||||
$SYNTAX$
|
||||
FT_ACCTWEEK( [ <dGivenDate> ], [ <nWeekNum> ] ) -> aDateInfo
|
||||
ft_AcctWeek( [ <dGivenDate> ], [ <nWeekNum> ] ) -> aDateInfo
|
||||
$ARGUMENTS$
|
||||
<dGivenDate> is any valid date in any date format. Defaults
|
||||
to current system date if not supplied.
|
||||
@@ -24,7 +24,7 @@
|
||||
aDateInfo[ 2 ] - The beginning date of the accounting week
|
||||
aDateInfo[ 3 ] - The ending date of the accounting week
|
||||
$DESCRIPTION$
|
||||
FT_ACCTWEEK() returns an array containing data about the
|
||||
ft_AcctWeek() returns an array containing data about the
|
||||
accounting week containing the given date.
|
||||
|
||||
An accounting period has the following characteristics:
|
||||
@@ -41,17 +41,17 @@
|
||||
weeks.
|
||||
$EXAMPLES$
|
||||
// get info about accounting week containing 9/15/90
|
||||
aDateInfo := FT_ACCTWEEK( SToD( "19900915" ) )
|
||||
aDateInfo := ft_AcctWeek( SToD( "19900915" ) )
|
||||
? aDateInfo[ 1 ] // 199037 (37th week)
|
||||
? aDateInfo[ 2 ] // 09/09/90 beginning of week 37
|
||||
? aDateInfo[ 3 ] // 09/15/90 end of week 37
|
||||
|
||||
// get info about accounting week 25 in year containing 9/15/90
|
||||
aDateInfo := FT_ACCTWEEK( SToD( "19900915" ), 25 )
|
||||
aDateInfo := ft_AcctWeek( SToD( "19900915" ), 25 )
|
||||
? aDateInfo[ 1 ] // 199025
|
||||
? aDateInfo[ 2 ] // 06/17/89 beginning of week 25
|
||||
? aDateInfo[ 3 ] // 06/23/90 end of week 25
|
||||
$SEEALSO$
|
||||
FT_DATECNFG() FT_ACCTMONTH() FT_ACCTQTR() FT_ACCTYEAR()
|
||||
ft_DateCnfg() ft_AcctMonth() ft_AcctQtr() ft_AcctYear()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_ACCTYEAR()
|
||||
ft_AcctYear()
|
||||
$CATEGORY$
|
||||
Date/Time
|
||||
$ONELINER$
|
||||
Return accounting year data
|
||||
$SYNTAX$
|
||||
FT_ACCTYEAR( [ <dGivenDate> ] ) -> aDateInfo
|
||||
ft_AcctYear( [ <dGivenDate> ] ) -> aDateInfo
|
||||
$ARGUMENTS$
|
||||
<dGivenDate> is any valid date in any date format. Defaults
|
||||
to current system date if not supplied.
|
||||
@@ -21,7 +21,7 @@
|
||||
aDateInfo[ 2 ] - The beginning date of the accounting year
|
||||
aDateInfo[ 3 ] - The ending date of the accounting year
|
||||
$DESCRIPTION$
|
||||
FT_ACCTYEAR() creates an array containing data about the
|
||||
ft_AcctYear() creates an array containing data about the
|
||||
accounting year containing the given date.
|
||||
|
||||
An accounting period has the following characteristics:
|
||||
@@ -38,11 +38,11 @@
|
||||
weeks.
|
||||
$EXAMPLES$
|
||||
// get info about accounting year containing 9/15/90
|
||||
aDateInfo := FT_ACCTYEAR( SToD( "19900915" ) )
|
||||
aDateInfo := ft_AcctYear( SToD( "19900915" ) )
|
||||
? aDateInfo[ 1 ] // 1990
|
||||
? aDateInfo[ 2 ] // 12/31/89 beginning of year
|
||||
? aDateInfo[ 3 ] // 12/29/90 end of year
|
||||
$SEEALSO$
|
||||
FT_DATECNFG() FT_ACCTWEEK() FT_ACCTMONTH() FT_ACCTQTR()
|
||||
ft_DateCnfg() ft_AcctWeek() ft_AcctMonth() ft_AcctQtr()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_ADAPTER()
|
||||
ft_Adapter()
|
||||
$CATEGORY$
|
||||
Video
|
||||
$ONELINER$
|
||||
Report the type of video adapter installed
|
||||
$SYNTAX$
|
||||
FT_ADAPTER() -> nResult
|
||||
ft_Adapter() -> nResult
|
||||
$ARGUMENTS$
|
||||
None
|
||||
$RETURNS$
|
||||
@@ -29,7 +29,7 @@
|
||||
SEGMENT directives, and also the ENDP and ENDS directives (a very
|
||||
minor task).
|
||||
$EXAMPLES$
|
||||
iVideo := FT_ADAPTER()
|
||||
iVideo := ft_Adapter()
|
||||
|
||||
DO CASE
|
||||
CASE iVideo == 0
|
||||
@@ -42,6 +42,6 @@
|
||||
QOut( "You have a VGA adapter." )
|
||||
ENDCASE
|
||||
$SEEALSO$
|
||||
FT_SETMODE()
|
||||
ft_SetMode()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_ADESSORT()
|
||||
ft_ADesSort()
|
||||
$CATEGORY$
|
||||
Array
|
||||
$ONELINER$
|
||||
Sort an array in descending order
|
||||
$SYNTAX$
|
||||
FT_ADESSORT( <aArray> [, <nStartIndex> [, <nEndIndex> ] ] ) -> aSorted
|
||||
ft_ADesSort( <aArray> [, <nStartIndex> [, <nEndIndex> ] ] ) -> aSorted
|
||||
$ARGUMENTS$
|
||||
<aArray> is the array to be sorted
|
||||
|
||||
@@ -24,12 +24,12 @@
|
||||
$DESCRIPTION$
|
||||
This function is used to sort an array in descending order, i.e., Z-A
|
||||
$EXAMPLES$
|
||||
FT_ADESSORT( aNames ) // Sort the Entire Array
|
||||
ft_ADesSort( aNames ) // Sort the Entire Array
|
||||
|
||||
FT_ADESSORT( aNames, 5 ) // Sort from the 5th Element On
|
||||
ft_ADesSort( aNames, 5 ) // Sort from the 5th Element On
|
||||
|
||||
FT_ADESSORT( aNames, , 10 ) // Sort the 1st 10 Elements
|
||||
ft_ADesSort( aNames, , 10 ) // Sort the 1st 10 Elements
|
||||
|
||||
FT_ADESSORT( aNames, 5, 10 ) // Sort Elements 5-10
|
||||
ft_ADesSort( aNames, 5, 10 ) // Sort Elements 5-10
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_AEMAXLEN()
|
||||
ft_AEMaxLen()
|
||||
$CATEGORY$
|
||||
Array
|
||||
$ONELINER$
|
||||
Find longest element within an array
|
||||
$SYNTAX$
|
||||
FT_AEMAXLEN( <aArray> [, <nDimension> [, <nStart> [, <nCount> ] ] ] ) ;
|
||||
ft_AEMaxLen( <aArray> [, <nDimension> [, <nStart> [, <nCount> ] ] ] ) ;
|
||||
-> nMaxlen
|
||||
$ARGUMENTS$
|
||||
<aArray> is the array containing the elements to be measured.
|
||||
@@ -30,19 +30,19 @@
|
||||
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 ) // Measure the 1st dimension of an Array
|
||||
|
||||
FT_AEMAXLEN( aArray, 2 ) // Measure the 2nd 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
|
||||
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
|
||||
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
|
||||
ft_AEMaxLen( aArray, 3, 5 ) // Measure Elements 5 to last in the
|
||||
// 3rd dimension or subarray
|
||||
$SEEALSO$
|
||||
FT_AEMINLEN()
|
||||
ft_AEMinLen()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_AEMINLEN()
|
||||
ft_AEMinLen()
|
||||
$CATEGORY$
|
||||
Array
|
||||
$ONELINER$
|
||||
Find shortest element within an array
|
||||
$SYNTAX$
|
||||
FT_AEMINLEN( <aArray> [, <nDimension> [, <nStart> [, <nCount> ] ] ] )
|
||||
ft_AEMinLen( <aArray> [, <nDimension> [, <nStart> [, <nCount> ] ] ] )
|
||||
-> nMinlen
|
||||
$ARGUMENTS$
|
||||
<aArray> is the array containing the elements to be measured.
|
||||
@@ -30,16 +30,16 @@
|
||||
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 ) // Measure the 1st dimension of an Array
|
||||
|
||||
FT_AEMINLEN( aArray, 2 ) // Measure the 2nd 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, 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, 9 ) // Measure Elements 5-9 of 3rd dimension
|
||||
|
||||
FT_AEMINLEN( aArray, 3, 5 ) // Measure Elements 5 to end of 3rd dimension
|
||||
ft_AEMinLen( aArray, 3, 5 ) // Measure Elements 5 to end of 3rd dimension
|
||||
$SEEALSO$
|
||||
FT_AEMAXLEN()
|
||||
ft_AEMaxLen()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_ALT()
|
||||
ft_Alt()
|
||||
$CATEGORY$
|
||||
Keyboard/Mouse
|
||||
$ONELINER$
|
||||
Determine status of the Alt key
|
||||
$SYNTAX$
|
||||
FT_ALT() -> lValue
|
||||
ft_Alt() -> lValue
|
||||
$ARGUMENTS$
|
||||
None
|
||||
$RETURNS$
|
||||
@@ -19,12 +19,12 @@
|
||||
This function is useful for times you need to know whether or not the
|
||||
Alt key is pressed, such as during a MemoEdit().
|
||||
$EXAMPLES$
|
||||
IF FT_ALT()
|
||||
IF ft_Alt()
|
||||
@ 24, 0 SAY "Alt"
|
||||
ELSE
|
||||
@ 24, 0 SAY " "
|
||||
ENDIF
|
||||
$SEEALSO$
|
||||
FT_CAPLOCK() FT_CTRL() FT_NUMLOCK() FT_PRTSCR() FT_SHIFT()
|
||||
ft_CapLock() ft_Ctrl() ft_NumLock() ft_PrtScr() ft_Shift()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_AMEDIAN()
|
||||
ft_AMedian()
|
||||
$CATEGORY$
|
||||
Array
|
||||
$ONELINER$
|
||||
Find middle value in array, or average of two middle values
|
||||
$SYNTAX$
|
||||
FT_AMEDIAN( <aArray> [, <nStart> [, <nEnd> ] ] )
|
||||
ft_AMedian( <aArray> [, <nStart> [, <nEnd> ] ] )
|
||||
-> nMedian
|
||||
$ARGUMENTS$
|
||||
<aArray> is the array containing the elements to be averaged.
|
||||
@@ -31,12 +31,12 @@
|
||||
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 ) // Return Median for entire array
|
||||
|
||||
FT_AMEDIAN( aArray, 2 ) // Return Median for elements from 2 to end
|
||||
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, , 9 ) // Return Median for 1st 9 elements
|
||||
|
||||
FT_AMEDIAN( aArray, 8, 40 ) // Return Median for elements 8 to 40
|
||||
ft_AMedian( aArray, 8, 40 ) // Return Median for elements 8 to 40
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_ANOMATCHES()
|
||||
ft_ANoMatches()
|
||||
$CATEGORY$
|
||||
Array
|
||||
$ONELINER$
|
||||
Find the number of array elements meeting a condition
|
||||
$SYNTAX$
|
||||
FT_ANOMATCHES( <aArray>, <bCompareBlock> ;
|
||||
ft_ANoMatches( <aArray>, <bCompareBlock> ;
|
||||
[, <nStartIndex> [, <nEndIndex> ] ] ) -> nNoOfMatches
|
||||
$ARGUMENTS$
|
||||
<aArray> is the array to be searched
|
||||
@@ -32,15 +32,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$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_XTOY()
|
||||
ft_XToY()
|
||||
$CATEGORY$
|
||||
Conversion
|
||||
$ONELINER$
|
||||
Convert from any data type to any other data type
|
||||
$SYNTAX$
|
||||
FT_XTOY( <xValueToConvert>, <cTypeToConvertTo> ;
|
||||
ft_XToY( <xValueToConvert>, <cTypeToConvertTo> ;
|
||||
[, <lWantYesNo> ] ) -> xResult
|
||||
$ARGUMENTS$
|
||||
<xValueToConvert> is the value to convert.
|
||||
@@ -27,10 +27,10 @@
|
||||
This function converts a value of character, date, numeric, logical,
|
||||
array or code block type to any of the other type. While it is
|
||||
guaranteed to return a value of the correct type, that value may not
|
||||
be meaningful (i.e., converting from a code block returns an EMPTY()
|
||||
be meaningful (i.e., converting from a code block returns an Empty()
|
||||
value of the desired type).
|
||||
$EXAMPLES$
|
||||
nNumericValue := FT_XTOY( cInputValue, "N" )
|
||||
IF FT_XTOY( nInputValue, "L" )
|
||||
nNumericValue := ft_XToY( cInputValue, "N" )
|
||||
IF ft_XToY( nInputValue, "L" )
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_AREDIT()
|
||||
ft_ArEdit()
|
||||
$CATEGORY$
|
||||
Array
|
||||
$ONELINER$
|
||||
2 dimensional array editing function using TBrowse
|
||||
$SYNTAX$
|
||||
FT_AREDIT( <nTop>, <nLeft>, <nBottom>, <nRight>, <Array Name>, ;
|
||||
ft_ArEdit( <nTop>, <nLeft>, <nBottom>, <nRight>, <Array Name>, ;
|
||||
<nElem>, <aHeadings>, <aBlocks> [, <bGetFunc> ] ) -> xElement
|
||||
$ARGUMENTS$
|
||||
<nTop>, <nLeft>, <nBottom>, <nRight> are coordinates for TBrowse
|
||||
@@ -25,14 +25,14 @@
|
||||
|
||||
[ <bGetFunc> ] is get editing function for handling individual elements
|
||||
$RETURNS$
|
||||
Value of element positioned on when exit FT_AREDIT()
|
||||
Value of element positioned on when exit ft_ArEdit()
|
||||
The type of this value depends on what is displayed.
|
||||
$DESCRIPTION$
|
||||
This function allows you to position yourself in an array,
|
||||
add and delete rows with the <F7> and <F8> keys,
|
||||
and pass a UDF with information to edit the individual gets.
|
||||
$EXAMPLES$
|
||||
FT_AREDIT( 3, 5, 18, 75, ar, @nElem, aHeadings, aBlocks )
|
||||
ft_ArEdit( 3, 5, 18, 75, ar, @nElem, aHeadings, aBlocks )
|
||||
|
||||
// This example will allow you to browse a 2 dimensional array
|
||||
// But you can't edit it since there is no GetBlock UDF
|
||||
@@ -69,6 +69,6 @@
|
||||
bGetFunc := {| b, ar, nDim, nElem | TestGet( b, ar, nDim, nElem ) }
|
||||
SetColor( "N/W, W/N, , , W/N" )
|
||||
CLS
|
||||
FT_AREDIT( 3, 5, 18, 75, ar, @nElem, aHeadings, aBlocks, bGetFunc )
|
||||
ft_ArEdit( 3, 5, 18, 75, ar, @nElem, aHeadings, aBlocks, bGetFunc )
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_ASUM()
|
||||
ft_ASum()
|
||||
$CATEGORY$
|
||||
Array
|
||||
$ONELINER$
|
||||
Sum the elements of an array
|
||||
$SYNTAX$
|
||||
FT_ASUM( <aArray> [, <nStartIndex> [, <nEndIndex> ] ] ) -> nSum
|
||||
ft_ASum( <aArray> [, <nStartIndex> [, <nEndIndex> ] ] ) -> nSum
|
||||
$ARGUMENTS$
|
||||
<aArray> is the array containing the elements to be summed.
|
||||
|
||||
@@ -25,12 +25,12 @@
|
||||
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 ) // Sum the Entire Array
|
||||
|
||||
FT_ASUM( aSubTotals, 5 ) // Sum from the 5th Element On
|
||||
ft_ASum( aSubTotals, 5 ) // Sum from the 5th Element On
|
||||
|
||||
FT_ASUM( aSubTotals, , 10 ) // Sum the 1st 10 Elements
|
||||
ft_ASum( aSubTotals, , 10 ) // Sum the 1st 10 Elements
|
||||
|
||||
FT_ASUM( aSubTotals, 5, 10 ) // Sum Elements 5-10
|
||||
ft_ASum( aSubTotals, 5, 10 ) // Sum Elements 5-10
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_AT2()
|
||||
ft_At2()
|
||||
$CATEGORY$
|
||||
String
|
||||
$ONELINER$
|
||||
Find position of the nth occurrence of a substring
|
||||
$SYNTAX$
|
||||
FT_AT2( <cSearch>, <cTarget> [, <nOccurs> [, <lCaseSens> ] ] ) -> nPos
|
||||
ft_At2( <cSearch>, <cTarget> [, <nOccurs> [, <lCaseSens> ] ] ) -> nPos
|
||||
$ARGUMENTS$
|
||||
<cSearch> is the character substring to search for.
|
||||
|
||||
@@ -31,25 +31,25 @@
|
||||
cSearch := "t"
|
||||
cTarget := "This is the day that the Lord has made."
|
||||
|
||||
FT_AT2( cSearch, cTarget ) // Returns ( 9 )
|
||||
ft_At2( cSearch, cTarget ) // Returns ( 9 )
|
||||
|
||||
FT_AT2( cSearch, cTarget, 2 ) // Returns ( 17 )
|
||||
ft_At2( cSearch, cTarget, 2 ) // Returns ( 17 )
|
||||
|
||||
FT_AT2( cSearch, cTarget, 2, .F. ) // Returns ( 9 )
|
||||
ft_At2( cSearch, cTarget, 2, .F. ) // Returns ( 9 )
|
||||
$SEEALSO$
|
||||
FT_FINDITH(), FT_RAT2()
|
||||
ft_FindITh(), ft_RAt2()
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_RAT2()
|
||||
ft_RAt2()
|
||||
$CATEGORY$
|
||||
String
|
||||
$ONELINER$
|
||||
Find position of the reversed nth occurrence of a substring
|
||||
$SYNTAX$
|
||||
FT_RAT2( <cSearch>, <cTarget> [, <nOccurs> [, <lCaseSens> ] ] ) -> nPos
|
||||
ft_RAt2( <cSearch>, <cTarget> [, <nOccurs> [, <lCaseSens> ] ] ) -> nPos
|
||||
$ARGUMENTS$
|
||||
<cSearch> is the character substring to search for.
|
||||
|
||||
@@ -70,12 +70,12 @@
|
||||
cSearch := "t"
|
||||
cTarget := "This is the day that the Lord has made."
|
||||
|
||||
FT_RAT2( cSearch, cTarget ) // Returns ( 22 )
|
||||
ft_RAt2( cSearch, cTarget ) // Returns ( 22 )
|
||||
|
||||
FT_RAT2( cSearch, cTarget, 2 ) // Returns ( 20 )
|
||||
ft_RAt2( cSearch, cTarget, 2 ) // Returns ( 20 )
|
||||
|
||||
FT_RAT2( cSearch, cTarget, 2, .F. ) // Returns ( 22 )
|
||||
ft_RAt2( cSearch, cTarget, 2, .F. ) // Returns ( 22 )
|
||||
$SEEALSO$
|
||||
FT_FINDITH(), FT_AT2()
|
||||
ft_FindITh(), ft_At2()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_BITCLR()
|
||||
ft_BitClr()
|
||||
$CATEGORY$
|
||||
String
|
||||
$ONELINER$
|
||||
Clear (reset) selected bit in a byte
|
||||
$SYNTAX$
|
||||
FT_BITCLR( <cByte>, <nBitPos> ) -> cByte
|
||||
ft_BitClr( <cByte>, <nBitPos> ) -> cByte
|
||||
$ARGUMENTS$
|
||||
<cByte> is a character from Chr(0) to Chr(255).
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
$DESCRIPTION$
|
||||
In effect, ANDs argument byte with a byte that has all bits set except
|
||||
the target bit. If bit is already clear (0), it remains clear.
|
||||
Note: Calls FT_ISBIT() which is also in this Library.
|
||||
Note: Calls ft_IsBit() which is also in this Library.
|
||||
|
||||
This function is presented to illustrate that bit-wise operations
|
||||
are possible with Clipper code. For greater speed, write .c or
|
||||
@@ -31,15 +31,15 @@
|
||||
$EXAMPLES$
|
||||
// This code would clear bit 4 in a byte represented by Chr( 115 ):
|
||||
|
||||
cNewByte := FT_BITCLR( Chr( 115 ), 4 )
|
||||
cNewByte := ft_BitClr( Chr( 115 ), 4 )
|
||||
? Asc( cNewbyte ) // result: 99
|
||||
? cNewByte // result: "c"
|
||||
|
||||
// This code would clear bit 5 in the byte represented by letter "A":
|
||||
|
||||
FT_BITCLR( "A", 5 ) // result: "A", since
|
||||
ft_BitClr( "A", 5 ) // result: "A", since
|
||||
// bit 5 already clear
|
||||
$SEEALSO$
|
||||
FT_BITSET() FT_ISBIT()
|
||||
ft_BitSet() ft_IsBit()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_BITSET()
|
||||
ft_BitSet()
|
||||
$CATEGORY$
|
||||
String
|
||||
$ONELINER$
|
||||
Set selected bit in a byte
|
||||
$SYNTAX$
|
||||
FT_BITSET( <cByte>, <nBitPos> ) -> cByte
|
||||
ft_BitSet( <cByte>, <nBitPos> ) -> cByte
|
||||
$ARGUMENTS$
|
||||
<cByte> is a character from Chr(0) to Chr(255).
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
$DESCRIPTION$
|
||||
In effect, ORs argument byte with a byte that has only the target bit
|
||||
set. If bit is already set, it remains set.
|
||||
Note: Calls FT_ISBIT() which is also in this Library.
|
||||
Note: Calls ft_IsBit() which is also in this Library.
|
||||
|
||||
This function is presented to illustrate that bit-wise operations
|
||||
are possible with Clipper code. For greater speed, write .c or
|
||||
@@ -31,16 +31,16 @@
|
||||
$EXAMPLES$
|
||||
// This code would set bit 4 in a byte represented by Chr( 107 ):
|
||||
|
||||
cNewbyte := FT_BITSET( Chr( 107 ), 4 )
|
||||
cNewbyte := ft_BitSet( Chr( 107 ), 4 )
|
||||
? Asc( cNewbyte ) // result: 123
|
||||
? cNewbyte // result: "{"
|
||||
|
||||
|
||||
// This code would set bit 5 in the byte represented by the letter "A".
|
||||
|
||||
? FT_BITSET( "A", 5 ) // result: "a"
|
||||
? ft_BitSet( "A", 5 ) // result: "a"
|
||||
// bit 5 set
|
||||
$SEEALSO$
|
||||
FT_BITCLR() FT_ISBIT()
|
||||
ft_BitClr() ft_IsBit()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_BLINK()
|
||||
ft_Blink()
|
||||
$CATEGORY$
|
||||
Menus/Prompts
|
||||
$ONELINER$
|
||||
Display a blinking message on the screen
|
||||
$SYNTAX$
|
||||
FT_BLINK( <cMsg>, [ <nRow> ], [ <nCol> ] ) -> NIL
|
||||
ft_Blink( <cMsg>, [ <nRow> ], [ <nCol> ] ) -> NIL
|
||||
$ARGUMENTS$
|
||||
<cMsg> is the string to blink.
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
A quick way to blink a msg on screen in the CURRENT colors.
|
||||
Restores colors on return.
|
||||
$EXAMPLES$
|
||||
FT_BLINK( "WAIT", 5, 10 ) // Blinks "WAIT" in current colors @ 5,10
|
||||
ft_Blink( "WAIT", 5, 10 ) // Blinks "WAIT" in current colors @ 5,10
|
||||
|
||||
@ 5, 10 SAY "WAIT - Printing Report"
|
||||
FT_BLINK( "..." ) // Blink "..." after wait message...
|
||||
ft_Blink( "..." ) // Blink "..." after wait message...
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_BYT2BIT()
|
||||
ft_Byt2Bit()
|
||||
$CATEGORY$
|
||||
Conversion
|
||||
$ONELINER$
|
||||
Convert byte to string of 1's and 0's
|
||||
$SYNTAX$
|
||||
FT_BYT2BIT( <cByte> ) -> cBitPattern
|
||||
ft_Byt2Bit( <cByte> ) -> cBitPattern
|
||||
$ARGUMENTS$
|
||||
<cByte> is the byte to convert.
|
||||
$RETURNS$
|
||||
@@ -31,12 +31,12 @@
|
||||
// Chr( 20 ) and Chr( 36 ), and deliver the result as a string in binary (bit)
|
||||
// format.
|
||||
|
||||
? FT_BYT2BIT( Chr( 20 ) ) // byte1: '0001 0100'
|
||||
? FT_BYT2BIT( Chr( 36 ) ) // byte2: '0010 0100'
|
||||
? ft_Byt2Bit( Chr( 20 ) ) // byte1: '0001 0100'
|
||||
? ft_Byt2Bit( Chr( 36 ) ) // byte2: '0010 0100'
|
||||
|
||||
? FT_BYT2BIT( FT_BYTEAND( Chr( 20 ), Chr( 36 ) ) )
|
||||
? ft_Byt2Bit( ft_ByteAnd( Chr( 20 ), Chr( 36 ) ) )
|
||||
// result: '0000 0100'
|
||||
$SEEALSO$
|
||||
FT_BYT2HEX()
|
||||
ft_Byt2Hex()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_BYT2HEX()
|
||||
ft_Byt2Hex()
|
||||
$CATEGORY$
|
||||
Conversion
|
||||
$ONELINER$
|
||||
Convert byte to hexadecimal version of its binary value
|
||||
$SYNTAX$
|
||||
FT_BYT2HEX( cByte ) -> cHexValue
|
||||
ft_Byt2Hex( cByte ) -> cHexValue
|
||||
$ARGUMENTS$
|
||||
<cByte> is the byte to convert.
|
||||
$RETURNS$
|
||||
@@ -28,12 +28,12 @@
|
||||
// Chr( 20 ) and Chr( 36 ), and deliver the result as a string in hexadecimal
|
||||
// format, using 'h' to signify hexadecimal.
|
||||
|
||||
? FT_BYT2HEX( Chr( 20 ) ) // byte1: '14h'
|
||||
? FT_BYT2HEX( Chr( 36 ) ) // byte2: '24h'
|
||||
? ft_Byt2Hex( Chr( 20 ) ) // byte1: '14h'
|
||||
? ft_Byt2Hex( Chr( 36 ) ) // byte2: '24h'
|
||||
|
||||
? FT_BYT2HEX( FT_BYTEAND( Chr( 20 ), Chr( 36 ) ) )
|
||||
? ft_Byt2Hex( ft_ByteAnd( Chr( 20 ), Chr( 36 ) ) )
|
||||
// result: '04h'
|
||||
$SEEALSO$
|
||||
FT_BYT2BIT()
|
||||
ft_Byt2Bit()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_BYTEAND()
|
||||
ft_ByteAnd()
|
||||
$CATEGORY$
|
||||
String
|
||||
$ONELINER$
|
||||
Perform bit-wise AND on two ASCII characters (bytes)
|
||||
$SYNTAX$
|
||||
FT_BYTEAND( <cByte1>, <cByte2> ) -> cByte
|
||||
ft_ByteAnd( <cByte1>, <cByte2> ) -> cByte
|
||||
$ARGUMENTS$
|
||||
<cByte1> and <cByte2> are characters from Chr(0) TO Chr(255).
|
||||
May be passed in Chr() form, as character literals, or as expressions
|
||||
@@ -30,10 +30,10 @@
|
||||
// of the byte represented by Chr(123) and leave the low nibble bits as in
|
||||
// the parameter byte.
|
||||
|
||||
cNewbyte := FT_BYTEAND( Chr( 123 ), Chr( 15 ) )
|
||||
cNewbyte := ft_ByteAnd( Chr( 123 ), Chr( 15 ) )
|
||||
? Asc( cNewByte ) // result: 11
|
||||
? cNewByte // result: non-printable character
|
||||
$SEEALSO$
|
||||
FT_BYTEOR() FT_BYTEXOR() FT_BYTENOT() FT_BYTENEG()
|
||||
ft_ByteOr() ft_ByteXor() ft_ByteNot() ft_ByteNeg()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_BYTENEG()
|
||||
ft_ByteNeg()
|
||||
$CATEGORY$
|
||||
String
|
||||
$ONELINER$
|
||||
Perform bit-wise negation on an ASCII character
|
||||
$SYNTAX$
|
||||
FT_BYTENEG( <cByte> ) -> cNewByte
|
||||
ft_ByteNeg( <cByte> ) -> cNewByte
|
||||
$ARGUMENTS$
|
||||
<cByte> is a character from Chr(0) to Chr(255).
|
||||
May be passed in Chr() form, as character literal, or
|
||||
@@ -29,9 +29,9 @@
|
||||
$EXAMPLES$
|
||||
// This code performs a bit-wise NEG on byte represented by Chr( 32 ):
|
||||
|
||||
cNewByte := FT_BYTENOT( Chr( 32 ) )
|
||||
cNewByte := ft_ByteNot( Chr( 32 ) )
|
||||
? Asc( cNewByte ) // result: 224
|
||||
$SEEALSO$
|
||||
FT_BYTEOR() FT_BYTEXOR() FT_BYTENOT() FT_BYTEAND()
|
||||
ft_ByteOr() ft_ByteXor() ft_ByteNot() ft_ByteAnd()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_BYTENOT()
|
||||
ft_ByteNot()
|
||||
$CATEGORY$
|
||||
String
|
||||
$ONELINER$
|
||||
Perform bit-wise NOT on an ASCII character (byte)
|
||||
$SYNTAX$
|
||||
FT_BYTENOT( <cByte> ) -> cNewByte
|
||||
ft_ByteNot( <cByte> ) -> cNewByte
|
||||
$ARGUMENTS$
|
||||
<cByte> is a character from Chr(0) to Chr(255).
|
||||
May be passed in Chr() form, as character literal, or
|
||||
@@ -29,9 +29,9 @@
|
||||
$EXAMPLES$
|
||||
// This code performs a bitwise NOT on byte represented by Chr( 32 ):
|
||||
|
||||
cNewByte := FT_BYTENOT( Chr( 32 ) )
|
||||
cNewByte := ft_ByteNot( Chr( 32 ) )
|
||||
? Asc( cNewByte ) // result: 223
|
||||
$SEEALSO$
|
||||
FT_BYTEOR() FT_BYTEXOR() FT_BYTENEG() FT_BYTEAND()
|
||||
ft_ByteOr() ft_ByteXor() ft_ByteNeg() ft_ByteAnd()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_BYTEOR()
|
||||
ft_ByteOr()
|
||||
$CATEGORY$
|
||||
String
|
||||
$ONELINER$
|
||||
Perform bit-wise OR on two ASCII characters (bytes)
|
||||
$SYNTAX$
|
||||
FT_BYTEOR( <cByte1>, <cByte2> ) -> cNewByte
|
||||
ft_ByteOr( <cByte1>, <cByte2> ) -> cNewByte
|
||||
$ARGUMENTS$
|
||||
<cByte1> and <cByte2> are characters from Chr(0) TO Chr(255).
|
||||
May be passed in Chr() form, as character literals, or as
|
||||
@@ -29,10 +29,10 @@
|
||||
// This code performs a bit-wise OR on two bytes represented
|
||||
// by Chr( 20 ) and Chr( 10 ):
|
||||
|
||||
cNewByte := FT_BYTEOR( Chr( 20 ), Chr( 10 ) )
|
||||
cNewByte := ft_ByteOr( Chr( 20 ), Chr( 10 ) )
|
||||
? Asc( cNewByte ) // result: 30
|
||||
? cNewByte // result: non-printable character
|
||||
$SEEALSO$
|
||||
FT_BYTEXOR() FT_BYTENOT() FT_BYTENEG() FT_BYTEAND()
|
||||
ft_ByteXor() ft_ByteNot() ft_ByteNeg() ft_ByteAnd()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_BYTEXOR()
|
||||
ft_ByteXor()
|
||||
$CATEGORY$
|
||||
String
|
||||
$ONELINER$
|
||||
Perform bit-wise XOR on two ASCII characters (bytes)
|
||||
$SYNTAX$
|
||||
FT_BYTEXOR( <cByte1>, <cByte2> ) -> cNewByte
|
||||
ft_ByteXor( <cByte1>, <cByte2> ) -> cNewByte
|
||||
$ARGUMENTS$
|
||||
<cByte1> and <cByte2> are characters from Chr(0) to Chr(255).
|
||||
May be passed in Chr() form, as character literals, or
|
||||
@@ -29,10 +29,10 @@
|
||||
// This code performs a bit-wise XOR on two bytes represented
|
||||
// by Chr( 32 ) and Chr( 55 ):
|
||||
|
||||
cNewByte := FT_BYTEXOR( Chr( 32 ), Chr( 55 ) )
|
||||
cNewByte := ft_ByteXor( Chr( 32 ), Chr( 55 ) )
|
||||
? Asc( cNewByte ) // result: 23
|
||||
? cNewByte // result: non-printable character
|
||||
$SEEALSO$
|
||||
FT_BYTEOR() FT_BYTENOT() FT_BYTENEG() FT_BYTEAND()
|
||||
ft_ByteOr() ft_ByteNot() ft_ByteNeg() ft_ByteAnd()
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_CALENDAR()
|
||||
ft_Calendar()
|
||||
$CATEGORY$
|
||||
Date/Time
|
||||
$ONELINER$
|
||||
@@ -23,7 +23,7 @@
|
||||
default is bright white text over green background.
|
||||
|
||||
<lShadow> is an optional logical variable. If true (.T.),
|
||||
it uses FT_SHADOW() to add a transparent shadow
|
||||
it uses ft_Shadow() to add a transparent shadow
|
||||
to the display, default (.F.).
|
||||
|
||||
<lShowHelp> is an optional logical variable. If true, uses
|
||||
@@ -36,7 +36,7 @@
|
||||
and current time.
|
||||
|
||||
$DESCRIPTION$
|
||||
FT_CALENDAR() simply displays today's date, time and julian
|
||||
ft_Calendar() simply displays today's date, time and julian
|
||||
day in a two line display with an optional box shadow. Cursor keys may
|
||||
be used to page through the calendar by day, week, month or year
|
||||
increments. Returns an 8 element array of calendar data:
|
||||
@@ -57,7 +57,7 @@
|
||||
$EXAMPLES$
|
||||
LOCAL aRetVal[ 8 ]
|
||||
CLS
|
||||
aRetVal := FT_CALENDAR( 10, 40, "W+/RB", .T., .T. )
|
||||
aRetVal := ft_Calendar( 10, 40, "W+/RB", .T., .T. )
|
||||
? aRetVal[ 1 ] // Result: 04/20/91
|
||||
? aRetVal[ 2 ] // Result: 4
|
||||
? aRetVal[ 3 ] // Result: 20
|
||||
@@ -67,7 +67,7 @@
|
||||
? aRetVal[ 7 ] // Result: 110
|
||||
? aRetVal[ 8 ] // Result: 12:45:20
|
||||
$SEEALSO$
|
||||
FT_DAYOFYR()
|
||||
ft_DayOfYr()
|
||||
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
/* $DOC$
|
||||
$NAME$
|
||||
FT_CAPLOCK()
|
||||
ft_CapLock()
|
||||
$CATEGORY$
|
||||
Keyboard/Mouse
|
||||
$ONELINER$
|
||||
Determine and optionally change the status of CapLock key
|
||||
$SYNTAX$
|
||||
FT_CAPLOCK([ <lNewSetting> ]) -> lCurrentSetting
|
||||
ft_CapLock([ <lNewSetting> ]) -> lCurrentSetting
|
||||
$ARGUMENTS$
|
||||
<lNewSetting> is optional and if supplied is the new setting
|
||||
for the CapLock key. Specify .T. to turn CapLock on, or .F. to
|
||||
@@ -23,10 +23,10 @@
|
||||
This function is useful if you need to know or set the status of the
|
||||
CapLock key for some reason.
|
||||
$EXAMPLES$
|
||||
IF FT_CAPLOCK()
|
||||
IF ft_CapLock()
|
||||
? "CapLock is active"
|
||||
ENDIF
|
||||
$SEEALSO$
|
||||
FT_ALT() FT_CTRL() FT_NUMLOCK() FT_PRTSCR() FT_SHIFT()
|
||||
ft_Alt() ft_Ctrl() ft_NumLock() ft_PrtScr() ft_Shift()
|
||||
$END$
|
||||
*/
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user