BlitzCoder Essentials
•
Home Page
•
About BlitzCoder
•
Contributors
•
Terms of Use
•
Email Us
Main Areas
•
BlitzCoder Chat
•
Discussions
•
Articles/Tutorials
•
Code Database
•
Link Database
•
Showcase Area
•
Worklogs
•
Competitions
Special Areas
•
Undocumented
Other Blitz Sites
•
Blitz Basic Home
•
Blitz Showcase
•
BlitzPlay Library
Forum Login
Username:
Password:
•
Register Now!
BlitzCoder Code Archives Page
Main Codes Page
"Local [] arrays are OBJECTS"
, by ashcroftman
Shows how useful this is, and how it brings blitz a little closer to OOP.
Code
;Example,(This is within main program, not a function or a type) local file[255] scanForfiles("test",file) print file[0] ;OUTPUT = "ANT" function scanForFiles(dir$,out[255]) for stuff out[stuff] = "ant" next end function ;As you can see, very very very useful. The only limitation is that ;the array size must be constant. But constants are better(It's how ;it should be done) const maxFiles = 255 local file[maxFiles] function doStuff(out[maxFiles]) ;would work fine.
Copyright(c) 2000-2004, BlitzCoder. All Rights Reserved.
Code software created by Krylar's Kreations