For Programmers: Free Programming Magazines  


Home > Archive > Compilers > January 2007 > Re: Non-declared Variables









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Non-declared Variables
Gene Wirchenko

2007-01-28, 4:13 am

ArarghMail610@Arargh.com wrote:

>On 26 Oct 2006 00:28:58 -0400, Peter Flass <Peter_Flass@Yahoo.com>
>wrote:
>
>
>MS Basic 16-bit compilers for the most part, didn't.
>
>Come to think of it, I don't think that the 32-bit ones do either.
>
>The exception to that is that some support an "OPTION EXPLICIT" which
>causes an error for undeclared variables, when used.


In VB6, you can set this to be included in any new program file. I
always used it.

>[BASIC never required declarations, even for arrays. -John]


It sure did. If you did not declare, then you got a default size
of 10 in each dimension of the first use.

Sincerely,

Gene Wirchenko
[Hey, people wrote lotsa student Basic programs with 10x10 arrays. If you
needed something bigger, which happened less than you might expect, then
you had to DIM them. -John]
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com