Variable Declarations and Type
Posted 15 December 2003 - 03:06 AM
I don't know if this is possible or even desirable, but what about adding an optional parameter to the Dim/Global/Local keywords that you can use to declare a variables type? Samples:
Dim $sMyVar As String
Dim $iMyVar As Integer
Dim $dMyVar As Double or Float
Global $sMyVar As String
Global $iMyVar As Integer
Global $dMyVar As Double or Float
Local $sMyVar As String
Local $iMyVar As Integer
Local $dMyVar As Double or Float
What do you all think?
Posted 15 December 2003 - 09:13 AM
$var1 = 10
$var2 = "20"
msgbox(0, "", $var1 * $var2)
msgbox(0, "", $var1 & $var2)
works fine, I don't see much demand for it. Unless you can think of a case it is required?
Posted 15 December 2003 - 01:09 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users