Module
Contents
Index 🔎︎
\<bookmark_value\>DefVar statement\</bookmark_value\>

# DefVar Statement

Sets the default variable type, according to a letter range, if no type-declaration character or keyword is specified.

## Syntax:

    Defxxx Characterrange1[, Characterrange2[,...]]

## Parameters:

\<emph\>Characterrange:\</emph\> Letters that specify the range of variables that you want to set the default data type for.

\<emph\>xxx:\</emph\> Keyword that defines the default variable type:

\<emph\>Keyword: \</emph\>Default variable type

\<emph\>DefVar:\</emph\> Variant

## Example:

    REM Prefix definitions for variable types:

    DefBool b

    DefDate t

    DefDbl d

    DefInt i

    DefLng l

    DefObj o

    DefVar v

    Sub ExampleDefVar

        vDiv=99 REM vDiv is an implicit variant

        vDiv="Hello world"

    End Sub