|
Post by Nicky Peter Hollyoake on Jul 8, 2008 21:01:31 GMT -5
Ok, in sub/function's ONLY IN SUBS AND FUNCTIONS! I want to be able to just do this
Sub i = i + 1 EndSub
So they don't have to be dim'd first, and just create them.
- Nicky
|
|
|
Post by andrian on Jul 11, 2008 8:39:19 GMT -5
If you put them at the beginning of your code, you don't have to declare them(you will need parenteses and a name though).
|
|
|
Post by Nicky Peter Hollyoake on Aug 2, 2008 5:08:29 GMT -5
I know, but example in JustBasic you can just put stuff like "a = a + 1" without declaring the 'a'. I want to be able to do that but just in subs/functions. Will make them look clean.
Sub Swap(&a, &b) c = a a = b b = c EndSub
- Nicky
|
|
|
Post by Supermonkey on Aug 2, 2008 5:21:39 GMT -5
I think that should apply to Subs/Functions as well. However a vb-esque option explicit wouldn't be a bad idea.
|
|
|
Post by Nicky Peter Hollyoake on Aug 2, 2008 5:48:40 GMT -5
What about an option "automaticailly allocate variables [ ]"?
|
|
|
Post by Supermonkey on Aug 4, 2008 14:46:26 GMT -5
That's essentially what option explicit is, with option explicit declared at the top of a source file you have to dim variables, if not then the variables are implicitly declared (i.e. as they are found in the source). So yes I'm all for that idea .
|
|