SP_ENHANCED

ENHANCED()

  Short:
  ------
  ENHANCED() Returns color integer for ENHANCED setting

  Returns:
  --------
  <nColor> => color integer for ENHANCED setting

  Syntax:
  -------
  ENHANCED()

  Description:
  ------------
  Gets the 2nd part of the color string and converts it
  to color INTEGER

  Examples:
  ---------
   nEnh := ENHANCED()
   ATT(10,10,10,20,nEnh)

  Notes:
  -------
  See appendix for more info on Super.Lib color usage

  Source:
  -------
  S_ENHAN.PRG

 

FT_NTOW

FT_NTOW()
 Translate numeric value to words

 Syntax

      FT_NTOW( <nNumber> ) -> cWords

 Arguments

     <nNumber>  An integer to translate

 Returns

     A text string representing <nNumber>

 Description

      Translates numeric input to a text string.

      FT_NTOW is intended to be used with integers only.  Since I don't
      know what your application will be, I can't assume the type of
      fraction you want returned (ninety nine cents, 99/100, .99, etc).
      If you want the fraction in words, just pass it as an integer.

      Do not pass a negative number!  Handle negative numbers any way
      you need to in your code.  (ie: CR, DB, Negative, Minus, etc.)

      Also, numeric 0 is returned as a null string.  You will need to
      make a decision how to output it (zero dollars, no dollars, etc).

 Examples

                ? FT_NTOW( 999 )                -> Nine Hundred Ninety Nine

                ? FT_NTOW( 1000 )               -> One Thousand

                ? FT_NTOW( 23 ) + " Dollars and " + FT_NTOW( 99 ) + " Cents"
                        -> Twenty Three Dollars and Ninety Nine Cents

                ? FT_NTOW( 23 ) + " Dollars and " + "99/100"
                        -> Twenty Three Dollars and 99/100

    x      := -23.99
    cents  := str( (x - int( x )) * 100, 2, 0 ) + "/100"
                x      := int( x )
    string := iif( x < 0, "Credit of ", "Debit of " )
                ? string + FT_NTOW( abs(x) ) + " Dollars and " + "99/100"
                     -> Credit of Twenty Three Dollars and 99/100

 Source: NTOW.PRG

 Author: Gary Baren

C5 super arrays

Clipper 5’s super arrays

Data Type Terms

Character :

A special data type consisting of one or more values in the extended character set. Characters can be grouped together to form strings. The maximum size of a character string In Clipper language is 65,534 bytes.

In Clipper, a character data may include any character, including “control” or “unprintable” characters, that are ASCII code less than 32.

Note : Characters with ASCII code 9, 10 and 13 always treated as “white spaces”; this important with EMPTY() and xTRIM() functions.

See Also:  String

Code Block :

A special data type that refers to a piece of compiled program code. In a program, the source code that specifies the creation of a code block.

Data Type :

The category of a data value. A data type is distinguished by the set of allowable values for that type, the set of operators that can be applied, and the storage format used to represent these values. In Clipper language, the following data types are defined: character, numeric, date, logical, array, object, code block, and NIL. Program variables may contain values of any type. Database field variables are limited to character, numeric, date, logical, and a special type called memo which is treated the same as character.

Date Type :

A special data type consisting of digits to store year, month, and day values. Operations on date values are based on chronological values.

Integer :

A number with no decimal digits. Note that Clipper language does not provide a separate data type for integer values.

Literal :

A source code element interpreted literally (as encountered), and assumed to have no abstract meaning. Generally a constant.

See Also: Constant

Logical Type :

A special data type consisting of true (.T.) or false (.F.) values.

See Also: Condition

Memo Type :

A special database field type consisting of one or more characters in the extended character set. The maximum size of a memo field in Clipper language is 65,534 bytes. A memo field differs only from a character string by the fact it is stored in a separate memo (.DBT file) and the field length is variable-length.

See Also: Character String

NIL :

A special data type that has only one allowable value. The special value (NIL) is automatically assigned to all uninitialized variables except publics, and is also passed as a substitute when arguments are omitted in a procedure or function call.

Numeric Type :

A special data type consisting of values that indicate magnitude. Numeric values consist of digits between zero and nine, a sign, and a decimal point.

Objects :

An object is an instance of a class. Each object has one or more attributes (called instance variables) and a series of operations (methods) that execute when a message is sent to the object. The object’s instance variables can only be accessed or assigned by sending messages to the object. Objects are created by calling a special function associated with a class.

See Also: Classes, Instance Variables, Messages, Methods

String :

Generically, a value of type character. In source code, a series of characters enclosed in single or double quotes.

See Also : Character

Substring :

A string within a string, usually to be specified as an argument of a function or command.