Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
danstl
Level 7

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? Smiley Happy

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
RokuKevin
Level 7

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
Level 7

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