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: 
joetesta
Level 10

Default values?

What is the default value of a boolean?  I know I can create a simple test app and find out myself, but why doesn't the documentation state clearly somewhere what the default value of a boolean is?  Would be just lovely if this page told me:
https://sdkdocs.roku.com/display/sdkdoc ... +and+Types

I would like to know so that I know whether or not to initiate the boolean or not:
https://sdkdocs.roku.com/pages/viewpage ... Id=1608549
If not specified, the default value for the field type is used
aspiring
0 Kudos
4 Replies
EnTerr
Level 8

Re: Default values?

There is no "default value" concept in BrightScript, i don't think.
This is a scenography issue, so take it up with the RSG guy Smiley Tongue

As a rule of thumb though, i'd expect the "zero-ish" value to be default, e.g. [ ], { }, False, "", invalid... 
0 Kudos
Roku Employee
Roku Employee

Re: Default values?

BrightScript itself doesn't have any concept of default values.

For Scene Graph fields, however, the default value would be false (0, "", empty, and so on for other types).

EnTerr beat me to it Smiley Wink  ... what he said.  Smiley Surprised
0 Kudos
joetesta
Level 10

Re: Default values?

Thanks guys - 
I love how you guys always imply that I'm making this stuff up Smiley Happy

https://sdkdocs.roku.com/pages/viewpage ... Id=1608549
If not specified, the default value for the field type is used

My guess would have been what you said (false) but I wanted a doc to link to.
aspiring
0 Kudos
EnTerr
Level 8

Re: Default values?

"joetesta" wrote:
Thanks guys - I love how you guys always imply that I'm making this stuff up Smiley Happy
https://github.com/rokudev/docs/issues , maybe that will help.
0 Kudos