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: 
EnTerr
Roku Guru

_identifiers in BRS?

What's the situation with identifiers starting with underscore in BSC?
Seems to work just fine:
BrightScript Debugger> _h = { _2: 3 }
BrightScript Debugger> ? _h._2
3

But the documentation says otherwise:
Identifiers (names of variables, functions, labels, or object member functions or interfaces (appear after a ".")) have the following rules.
* must start with an alphabetic character (a – z)

I am hoping for confirmation that indeed, _names are safe to use and documentation is behind.
0 Kudos
2 REPLIES 2
RokuMarkn
Visitor

Re: _identifiers in BRS?

Yes, the documentation was wrong. Underscore may be the first character of an identifier.

--Mark
0 Kudos
EnTerr
Roku Guru

Re: _identifiers in BRS?

"RokuMarkn" wrote:
Yes, the documentation was wrong. Underscore may be the first character of an identifier.

Excellent, thank you!
0 Kudos