Bookshelf Home | Contents | Index | PDF |
Siebel VB Language Reference > VB Language Reference > Deftype StatementThis standard VB statement specifies the default data type for one or more variables. SyntaxDefCur varTypeLetters ReturnsUsageVarTypeLetters can be a single letter, a comma-separated list of letters, or a range of letters. For example, a-d indicates the letters a, b, c, and d. The case of the letters is not important, even in a letter range. The letter range a-z is treated as a special case: it denotes all alpha characters, including the international characters. The Deftype statement affects only the module in which it is specified. It must precede any variable definition within the module. Variables defined using a Global or Dim statement can override the Deftype statement by using an As clause or a type character. ExampleThis example finds the average of bowling scores entered by the user. Because the variable average begins with A, it is defined as a single-precision floating point number. The other variables are defined as integers. DefInt c,s,t See AlsoDeclare Statement |
Siebel VB Language Reference |