Declare user Functions?

BlitzMax Forums/BlitzMax Programming/Declare user Functions?

Garrett(Posted 2006) [#1]
Greetings,

I was wondering if it is possible to declare my user functions at the begining of
my source so I can place the code for the functions at the bottom of my source
code?

I've noticed that everything I've seen for examples places the functions at the
begining of the source so that the function is available further down in the
source. I kind of prefer keeping the flow of the source near the top and place
my functions below the flow. Other basics that I've used allow me to declare
the functions at the top along with declaring globals and consts.

I didn't see any info regarding this in the docs and searched the forum already,
but didn't find any posts about this. :-(

Thanks,
-Garrett


TomToad(Posted 2006) [#2]
You can put functions anywhere in the code. So they can be at the beginning, middle or end.
You can also put them in a completely different file and Include or Import them as well.


tonyg(Posted 2006) [#3]
Yes. Does it not work for you?


Garrett(Posted 2006) [#4]
Sorry, I didn't try it because I'm used to having to declare the functions when
I place them below the normal read flow of the source. It's that interpreter
frame of mind. ;-)

Thanks for the help you two,
-Garrett