GLBasic forum

Main forum => GLBasic - en => Topic started by: bigsofty on 2008-Feb-25

Title: Silly simple question...
Post by: bigsofty on 2008-Feb-25
Are all new variables, typed records, arrays of types, numeric, locals, globals etc. automatically initialised with 0? My initial tests say they are but it would be nice to have the official word?
Title: Silly simple question...
Post by: Moru on 2008-Feb-25
In basic they are supposed to be at least.
Title: Silly simple question...
Post by: Kitty Hello on 2008-Feb-25
Yes, unless spcified outside of a function:
function foo:
endfunction
GLOBAL init = 13
Title: Silly simple question...
Post by: bigsofty on 2008-Feb-26
Ah, thats good... have... to... resist... typing... "GLOBAL a = 0" hehe ;)