[futurebasic] Re: [FB] Back to basics - A dim question

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : September 2001 : Group Archive : Group : All Groups

From: ted spencer <ted@...>
Date: Thu, 27 Sep 2001 08:08:08 -0400
From the nimble fingers of Bernie Wylde (bernie@...) (27/9/2001 7:53
AM) came...

> Can anyone explain the advantages of DIMing local vars?

Because if you set the prefs like the gurus want you to, she won't fly
without dimming them...

> Are there any speed gains? Could it prevent crashes?

No. Yes. Without dim (and I'm an expert on this) you can shove a long
integer into a byte if you have a lapse of (personal) memory (which can have
serious results). If they're dimmed, you get a compile error.
> Also, assuming that the following give identical results, are the different
> ways of DIMing 'myVar' purely for back compatibility?
> DIM myVar
> DIM myVar%

There's a guy sitting in this room who delights in seeking out ever more
arcane syntax just to see if the rest of us can figure it out. Those 3 dims
are but the thin edge..

> Also2, is there any advantage/disadvantage in DIMing a var which appears in
> the parameter list of a local fn?

All of the above apply... When variables aren't necessarily typed (x vs x&
for eg.) the FN has the same problem: How big is that parameter?
Ted Spencer; ted@...
Be Brave
Stay Calm
Watch for the signs