Qbasicnews.com
July 04, 2020, 08:12:00 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: declair variables?  (Read 1794 times)
xteraco
Ancient QBer
****
Posts: 450



WWW
« on: February 15, 2005, 08:31:08 AM »

i was screwing around, w/ fb and noticed that my program would work even though i didnt dim my var's!!!  wtf is going on?     it was a stupid program

for i = 1 to 1000
print "hello world"
print i
next

but that was it.....Huh
Logged

url=http://www.random-seed.net][/url]
Z!re
*/-\*
*****
Posts: 4599


« Reply #1 on: February 15, 2005, 08:40:08 AM »

And the problem is?

BASIC doesent require var initialization.

You can add OPTION EXPLICIT to the top of your code to force variables to always need initialization.


wtf, omg, lol, roflmao!!!1111 :roll:
Logged
xteraco
Ancient QBer
****
Posts: 450



WWW
« Reply #2 on: February 15, 2005, 08:46:12 AM »

i was using a basic program that required initialization of variables before usage...so i'm used to it....+ not new @ programming, just new @ basic
Logged

url=http://www.random-seed.net][/url]
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!