Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
danstl
Visitor

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
Model: 2050X - wired
S/N: J0A07F000104
Location: St. Louis, MO
ISP: At&t 12Mb (primary) -- Charter 20Mb (secondary)
0 Kudos
2 REPLIES 2
RokuKevin
Visitor

Re: some questions - having some issues following the examples..

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.
0 Kudos
newmediadude
Visitor

Coding standards

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!
- Marcelo
Twitter.com/WebDevicesDude
CenterForNewMediaStudies.com
0 Kudos