Introduction BITTOC() Converts position-dependent bits into characters CELSIUS() Converts a Fahrenheit temperature value into Celsius CLEARBIT() Clears one or more bits within a number to zero CTOBIT() Converts a character string into a bit pattern CTOF() Converts a special 8-byte string into a floating point number CTON() Converts a numeric string into a different base EXPONENT() Determines the exponent of a floating point number (base 2) FAHRENHEIT() Converts a temperature value from Celsius into Fahrenheit FTOC() Converts a floating point number into a special 8-byte string INFINITY() Creates the largest number possible (21023) INTNEG() Converts an unsigned integer into a signed integer INTPOS() Converts a signed integer into an unsigned integer ISBIT() Tests the bits in a number LTON() Converts a logical value into a numeric value MANTISSA() Determines the mantissa of a floating point number (base2) NTOC() Converts numbers in a digit string into a different number base NUMAND() Performs a 16-bit "AND" of a list of numbers NUMCOUNT() Uses the internal CA-Clipper Tools counter NUMHIGH() Returns the higher value byte in a 16-bit number NUMLOW() Returns the lower value byte in a 16-bit number NUMMIRR() Mirrors 8-bit or 16-bit values NUMNOT() Performs a 16-bit "NOT" of a number NUMOR() Performs a 16-bit "OR" of a list of numbers NUMROL() Performs a 16-bit left rotation of a number NUMXOR() Performs a 16-bit "XOR" of two numbers RAND() Generates random numbers RANDOM() Generates random numbers SETBIT() Sets one or more bits in a number
Daily Archives: June 27, 2013
Tools – String Manipulations
Introduction ADDASCII() Adds a value to each ASCII code in a string AFTERATNUM() Returns remainder of a string after nth appearance of sequence ASCIISUM() Finds sum of the ASCII values of all the characters of a string ASCPOS() Determines ASCII value of a character at a position in a string ATADJUST() Adjusts the beginning position of a sequence within a string ATNUM() Determines the starting position of a sequence within a string ATREPL() Searches for a sequence within a string and replaces it ATTOKEN() Finds the position of a token within a string BEFORATNUM() Returns string segment before the nth occurrence of a sequence CENTER() Centers a string using pad characters CHARADD() Adds the corresponding ASCII codes of two strings CHARAND() Links corresponding ASCII codes of paired strings with AND CHAREVEN() Returns characters in the even positions of a string CHARLIST() Lists each character in a string CHARMIRR() Mirrors characters within a string CHARMIX() Mixes two strings together CHARNOLIST() Lists the characters that do not appear in a string CHARNOT() Complements each character in a string CHARODD() Returns characters in the odd positions of a string CHARONE() Reduces adjoining duplicate characters in string to 1 character CHARONLY() Determines the common denominator between two strings CHAROR() Joins the corresponding ASCII code of paired strings with OR CHARPACK() Compresses (packs) a string CHARRELA() Correlates the character positions in paired strings CHARRELREP() Replaces characters in a string depending on their correlation CHARREM() Removes particular characters from a string CHARREPL() Replaces certain characters with others CHARSORT() Sorts sequences within a string CHARSPREAD() Expands a string at the tokens CHARSWAP() Exchanges all adjoining characters in a string CHARUNPACK() Decompresses (unpacks) a string CHARXOR() Joins ASCII codes of paired strings with exclusive OR operation CHECKSUM() Calculates the checksum for a character string (algorithm) COUNTLEFT() Counts a particular character at the beginning of a string COUNTRIGHT() Counts a particular character at the end of a string CRYPT() Encrypts and decrypts a string CSETATMUPA() Determines setting of the multi-pass mode for ATXXX() functions CSETREF() Determines whether reference sensitive functions return a value EXPAND() Expands a string by inserting characters JUSTLEFT() Moves characters from the beginning to the end of a string JUSTRIGHT() Moves characters from the end of a string to the beginning LIKE() Compares character strings using wildcard characters LTOC() Converts a logical value into a character MAXLINE() Finds the longest line within a string NUMAT() Counts the number of occurrences of a sequence within a string NUMLINE() Determines the number of lines required for string output NUMTOKEN() Determines the number of tokens in a string PADLEFT() Pads a string on the left to a particular length PADRIGHT() Pads a string on the right to a particular length POSALPHA() Determines position of first alphabetic character in a string POSCHAR() Replaces individual character at particular position in string POSDEL() Deletes characters at a particular position in a string POSDIFF() Finds the first position from which two strings differ POSEQUAL() Finds the first position at which two strings are the same POSINS() Inserts characters at a particular position within a string POSLOWER() Finds the position of the first lower case alphabetic character POSRANGE() Determines position of first character in an ASCII code range POSREPL() Replaces one or more characters from a certain position POSUPPER() Finds the position of the first uppercase, alphabetic character RANGEREM() Deletes characters that are within a specified ASCII code range RANGEREPL() Replaces characters within a specified ASCII code range REMALL() Removes characters from the beginning and end of a string REMLEFT() Removes particular characters from the beginning of a string REMRIGHT() Removes particular characters at the end of a string REPLALL() Exchanges characters at the beginning and end of a string REPLLEFT() Exchanges particular characters at the beginning of a string REPLRIGHT() Exchanges particular characters at the end of a string RESTTOKEN() Recreates an incremental tokenizer environment SAVETOKEN() Saves the incremental tokenizer environment to a variable SETATLIKE() Provides an additional search mode for all AT functions STRDIFF() Finds similarity between two strings (Levenshtein Distance) STRSWAP() Interchanges two strings TABEXPAND() Converts tabs to spaces TABPACK() Converts spaces in tabs TOKEN() Selects the nth token from a string TOKENAT() Determines the most recent TOKENNEXT() position within a string TOKENEND() Determines if more tokens are available in TOKENNEXT() TOKENINIT() Initializes a string for TOKENNEXT() TOKENLOWER() Converts initial alphabetic character of a token into lowercase TOKENNEXT() Provides an incremental tokenizer TOKENSEP() Provides separator before/after most recently retrieved TOKEN() TOKENUPPER() Converts the initial letter of a token into upper case VALPOS() Determines numerical value of character at particular position WORDONE() Reduces multiple appearances of double characters to one WORDONLY() Finds common denominator of 2 strings on double character basis WORDREPL() Replaces particular double characters with others WORDSWAP() Exchanges double characters lying beside each other in a string WORDTOCHAR() Exchanges double characters for individual ones
Tools – Introduction
Introduction ------------------------------------------------------------------------------ Clipper Tools contains over 800 functions which you can use to develop Clipper applications and system-level routines. These functions give Clipper programmers capabilities previously reserved for C or Assembler programmers with detailed system knowledge. In order to use working memory as economically as possible, virtually all the functions are written in Assembler and are highly optimized. This guarantees high speed with a minimal use of memory. This efficiency is further supported by the modularity of the software within the Clipper Tools library. Almost all Clipper Tools functions included in Harbour libhbct library.
Multiplication–binary
* Multiplication--binary (Mathematical) ------------------------------------------------------------------------------ Syntax <nNumber1> * <nNumber2> Type Numeric Operands <nNumber1> and <nNumber2> are the two numeric expressions to multiply. Description The multiplication operator (*) is a binary operator that returns a numeric value from its operation on <nNumber1> and <nNumber2>. Examples . This example shows multiplication results using different operands: ? 3 * 0 // Result: 0 ? 3 * -2 // Result: -6 ? -3 * 2 // Result: -6 ? -3 * 0 // Result: 0 ? -1 * 3 // Result: -3 ? -2 * -3 // Result: 6 ? 2 * -3 // Result: -6 ? 1 * -3 // Result: -3
See Also: % ** + – / = (compound) SET DECIMALS SET FIXED
( ) Function or grouping indicator
( ) Function or grouping indicator (Special) ------------------------------------------------------------------------------ Description Parentheses (()) in expressions group certain operations for readability or to force a particular evaluation order. Parentheses also identify a function call. When specifying the grouping operator, the item that falls within the parentheses must be a valid expression. Sub-expressions may be further grouped. For function calls, a valid function name must precede the left parenthesis, and the function arguments, if any, must be contained within the parentheses. Examples . This example changes the default order of expression evaluation: ? 5 * (10 + 6) / 2 // Result: 40 . The next example shows a function call: x := SQRT(100)
See Also: &