ID : 311
DefInt
Function
To declare local variable for Integer Type.
Format
DefInt variable name [=initial value][,variable name 2[=initial value 2]…]
Guaranteed entry
- Variable name
- Designate a variable name. Each name must be specified in accordance with the Naming convention.
- Initial value
- Designate an initial value for the variable you created.
- Variable name 2, initial value 2
- You can declare multiple local variables of Integer Type at the same time. ", (comma)" can be used for a separation.
Description
-
Related Terms
-
Attention
This command is RC7M compatible, but an unrecommended command. This might be no longer supported, so use Dim for future use.
When you don't put any value in initial value, "0" will be assigned.
Example
'!TITLE "Declaration of Integer Type Data"
' Assign a value to variable declared in integer type data and display it on the message output window
Sub Sample_DefInt
' Declare a variable named aaa in integer type data
DefInt aaa
' Declare a variable named bbb in integer type data
DefInt bbb
aaa = 10
bbb = 10.6
' Display "10" on the message output window
PrintDbg aaa
' Display "11" on the message output window
PrintDbg bbb
End Sub
ID : 311