Using the Type Wizard

How to:

When you create a variable or define an argument or return variable, you must assign a data type to it. A data type is either a format or a class. Assign data types using the Type Wizard.

There are two kinds of data types: Built-in Type (or format) and User-defined Class.

If you choose Built-in Type, you have three basic formats:

If you choose User-defined Class, you must have already defined a class. See Developing Classes and Objects for more information.

Note: The Type Wizard does not create specifications for the following data types: date-time, packed-decimal, and text. You must enter the specification manually in the data type field. For more information on specifying packed-decimal or text, see the Describing Data With WebFOCUS Language manual.

Type Wizard dialog box


Top of page

x
Procedure: How to Apply Alphanumeric Format
  1. In the Type Wizard, select Built-in Type from the list.
  2. Select Simple or Stack of from the list.
  3. Select Alphanumeric from the list of formats.
  4. In the of size box, enter a length for your alphanumeric field (from 1 to 256 characters).

    or

    Select the Variable length check box to have a variable length field.

  5. Click OK.

Top of page

x
Procedure: How to Apply Date Format
  1. In the Type Wizard, select Built-in Type from the list.
  2. Select Simple or Stack of from the list.
  3. Select Date from the list of formats.
  4. Select a format from the list of date formats. This determines how your date appears when you view it.
  5. Click OK.

Top of page

x
Procedure: How to Apply Numeric Format
  1. In the Type Wizard, select Built-in Type from the list.
  2. Select Simple or Stack of from the list.
  3. Select Integer, Floating Point, or Double Precision from the list of formats.
  4. In the of size box, enter a width. This is the maximum number of positions in your field, comprising of all the digits (including any past the decimal point), the decimal point, any edit options, and, if necessary, a minus sign.

    For Double Precision and Floating Point formats, you must enter the number of places after the decimal point. The maximum number that you can enter depends on what numeric format you chose.

  5. In the Display Options box, select any combination of the following:

    Option

    Description

    Suppresses zeros

    Suppresses leading zeros and displays a space if the value is 0.

    Leading zeros

    Adds leading zeros to the full field length.

    Include commas

    Inserts a comma after every third significant digit. This option takes effect automatically for Double Precision format.

    Floating dollar

    Adds a dollar sign immediately to the left of the number and inserts a comma after every third significant digit.

    Fixed dollar

    Adds a dollar sign to the left of the field and inserts a comma after every third significant digit.

    Scientific notation

    Displays the number in scientific notation.

    Credit negatives

    Adds the characters CR after a negative number.

    Bracket negatives

    Encloses a negative number in parentheses.

  6. Click OK.


x
Procedure: How to Apply a User-defined Class
  1. In the Type Wizard, select User-defined Class from the drop-down list.

    Note: User-defined classes are available only if you defined classes in the procedure.

  2. Select Simple or Stack of from the drop-down list.
  3. Select a class from the list.
  4. Click OK.

    For more information on defining classes, see Developing Classes and Objects.


WebFOCUS