I say "can't run" because if you DON'T use quotes, Kix will mangle the command.

 Code:
$Var = 4
will implicitly declare the variable "Var" as a global, and define it to contain the number "4". Global variables have scope (are visible) to all parts of your program, including functions.
 Code:
Dim $Var
$Var = 4
performs nearly the same thing, except that the variable is first Declared as a local var and then Defined to contain a value. Using Dim to declare local vars and Global to declare global vars gives you control over the visibility.

Imagine that you use the variable "x" as a simple index counter inside a for/next loop. Inside that loop, you call a function that also uses "x" as a temporary variable. Without this restriction of scope, the function will modify the global value, affecting the loop in your main program. Using Dim to define a local var makes Kix treat the $X in the main program and $X in the function as totally different variables, even though they seem to have the same name.

You'll see that the UDFs that I write take this one step further. Any variable used in my functions uses the form $_Name. Introducing the "_" char serves two purposes - if someone uses the function without declaring the Explicit option, conflicts in variable names would be unlikely. Further, it provides a visual distinction - my brain sees $_X and knows it's different from $X in the main program.

I can appreciate your feelings for 10 Dim lines for 5 lines of code, so to speak. You can
 Code:
Dim $X, $Y, $Z, $A, $B, $C
declare many variables on one line, but I find that challenging when I come back after 6 months to update my code and have to wonder "what the @#$@ is that var used for. I try to declare and comment each major var in my code - it's more work, but I find it worth the effort. I have Kix projects with over 15,000 lines of code, so you can see how that can get difficult to maintain without strict habits. I do, however, declare multiple vars on one line when they are related to each other.
 Code:
Dim $I, $J, $K   ; index pointers
Dim $aFiles, $File  ; array of files & enumerator
Dim $lblField1, $lblField2   ; KixForms field labels for form 1

I also use liberal amounts of comments. KGen allows you to strip off all of the comments from the finished script, so I can compare the commented and uncommented scripts.. this shows that my large projects have a 1.3:1 comment to code ratio. Yes, there are more comment than code characters!

Hope that clears things up.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D