Forum Discussion

danstl's avatar
danstl
Visitor
16 years ago

some questions - having some issues following the examples..

OK, I have read through the docs, and looked at the examples, and have a couple questions.

It appears that all the brs files in the source directory get compiled at once, so you can seperate your functions into ANY brs file and you do not make a "call" or "include" for those brs files directly, but just the functions? So you can have your brs files seperated based on functionality, or any way you want to organize your app?

Does it matter what brs you call the Sub Main() ?

Do you have any more details on these examples - it is very hard to follow the code because one file may call a function from another file but there is no comment that states what file that function is in... Or is this just the fun of working with these examples? 🙂

I will have more questions im sure - thanks in advance.

-Dan

2 Replies

  • Dan,

    You are correct that it does not matter what file your functions are in. All the .brs files are compiled and loaded when the app starts. Likewise, it does not matter the file name that Main() is in.
  • Are there any coding standards for Brightscript that one should follow. I didn't see that in any documentation. Such as break up the functions into separate files, commenting, etc.

    Just wondering.

    Thanks!