Discover intrinsic data types

Completed

When declaring a variable, you need to give it a data type. A data type defines what kind of information you are working with, whether it is a numeric value, a text value, or a date value.

Data types can be grouped into two categories:

  • Fundamental data types

  • Complex data types

Fundamental data types

A fundamental data type can't be divided in sub values, and it always holds one value.

  • Numeric

    • Action

    • Integer

    • BigInteger

    • Decimal

    • Option

    • Char

    • Byte

    • Duration

  • String

    • Text

    • Code

  • Boolean

  • Date

  • Time

  • DateTime

The Option data type is a zero-based enumerator type; therefore, you can convert option values to integers. An Option data type is a numeric data type for that reason, because the option values are stored as integers.

The Char data type is a single character; therefore; it is also stored as a number. It's using the ASCII character number. You can only have 256 characters, so a character can only have a value from 0 to 255.

The Action data type isn't available as a data type for a field in a table, but it's used to specify what action that a user performs on a page. The PAGE.RUNMODAL and the RUNMODAL methods (which will be discussed later in this learning path) return an Action data type value. The following actions are available:

  • OK

  • Cancel

  • LookupOK

  • LookupCancel

  • Yes

  • No

  • RunObject

  • RunSystem

Complex data types

You can use Complex data types when you want to work with records in tables, pictures (bitmaps), or disk files. These data types can store multiple values. Application language contains numerous Complex data types:

  • BigText

  • BLOB

  • CodeUnit

  • DateFormula

  • Dialog

  • File

  • Fieldref

  • GUID

  • InStream and OutStream

  • KeyRef

  • Page

  • Query

  • Record

  • RecordID

  • RecordRef

  • Report

  • System

  • TableFilter

  • Variant

  • List & Dictionary

The Record data type points to records of a specific table. Records hold multiple values because they include multiple fields.