NOZDIV() Prevents divide-by-zero NBR2STR() Correctly orders numerics where negative TRUEVAL() Returns val of ALL numerics in a string AT2CHAR() Returns the String color equivalent of a color attribute
Tag Archives: NBR2STR()
SP_NBR2STR
NBR2STR() Short: ------ NBR2STR() Correctly orders numerics where negative Returns: -------- String Syntax: ------- NBR2STR(nNumber) Description: ------------ Ensure numeric fields are correctly ordered when converting to type character and when taking negatives into account. This is done by attaching CR, DB or CZ to the end of the number to overcome the placement of (-+) in the ASCII scale. Examples: --------- index on LASTNAME+NBR2STR(amount_due) to NEWINDEX Source: ------- S_NBR2ST.PRG
SP_BLDNDX
BLDNDX() Short: ------ BLDNDX() Interactively create a new index Returns: -------- <cIndexName> => New index name less extension Syntax: ------- BLDNDX([aFields,aDescriptions],[aIndexfiles],[Buildex]) Description: ------------ Allows point and shoot building of a new index. [aFields] - an array of legal field names. If not passed, all fields in current DBF will be used. [aDescriptions] - an array of field descriptions. If not passed,field names in current DBF will be used. Pass both or neither of [aFields] and [aDescriptions]. [aIndexFiles] - an array of currently open index files to be reopened on exit from bldndx() (up to 10). Otherwise, only the newly created index file will be left open. [lBuildex] - allow use of Buildex() to build complex expressions. Default is False. Examples: --------- BLDNDX() -- or -- aNdxFlds := {"LASTNAME","FIRSTNAME","CITY"} aNdxDesc := {"Last Name","First Name","City"} aNdxOpen := {"CUSTOMER","STATE","ZIPCODE"} BLDNDX(aNdxFlds,aNdxDesc,aNdxOpen) BLDNDX(nil,nil,aNdxOpen,.t.) // use buildex() Warnings: ---------- Indexes created with this function will require the functions DTOS() and NBR2STR() be loaded prior to use if a date or numeric field is part of the index. You can do this with the EXTERNAL statement. EXTERNAL DTOS, NBR2STR Notes: ------- All fields are converted to type Character. The function NBR2STR() is used to create a usable character expression from a numeric field by first adding 1,000,000 to the number. Source: ------- S_BLDNDX.PRG