advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
DEFtype Statement Details
  ◄Summary►  ◄Details►  ◄Example►                ◄Contents►  ◄Index►  ◄Back►
──────────────────────────────────────────────────────────────────────────────
 DEFtype letterrange [,letterrange]...
 
 Usage Notes
   ■ By using one of the DEFtype statements (DEFINT, DEFLNG, DEFCUR, DEFSNG,
     DEFDBL, or DEFSTR), you can specify that all variables starting with a
     given letter or range of letters are one of the elementary variable
     types without using a type-declaration suffix.
 
   ■ DEFtype sets the default data type. For example, in the following code
     fragment, Message is a string variable:
 
         DEFSTR A-Q
         .
         .
         .
         Message = "Out of stack space."
 
   ■ The case of the letters in letterrange is not significant. These three
     statements are equivalent:
 
         DEFINT I-N
         DEFINT i-n
         DEFINT i-N
 
   ■ A type-declaration character (%, &, !, #, @, $) always takes precedence
     over a DEFtype statement. DEFtype statements do not affect record
     elements.
 
   ■ If you do not specify a data type in a DEFtype statement, single-
     precision is the default.
 
   ■ After you specify a DEFtype statement in your program, Visual Basic
     automatically inserts a corresponding DEFtype statement in each
     procedure you create.
 
   ■ DEFtype statements only affect variable names in the module in which
     they appear. A DEFtype statement affects all variables starting with
     the given letter or range of letters. Note: I%, I&, I!, I#, I@, and I$
     are all distinct variables, and each can hold a different value.