Declare user Functions?
BlitzMax Forums/BlitzMax Programming/Declare user Functions?
| ||
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 |
| ||
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. |
| ||
Yes. Does it not work for you? |
| ||
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 |