Your Digital Media Has Never Looked So Good

 
User avatar
lkrocek
Topic Author
Posts: 20
Joined: Wed Mar 28, 2018 4:04 am
Contact:

global as a reserved word

Wed Oct 03, 2018 4:32 am

Reserved Words

it seems I miss global word in list of reserved words, cause my app crash if I will use it:
sub init()
  global = "x" 'originally I wanted to use: global = getGlobalAA()
end sub


with this result:
Type Mismatch. (runtime error &h18) in ...


it's kinda important thing because eslint is not discovering it as well and then it says everything is ok.
Platforms integration specialist
====================
@ https://suite.st/
 
User avatar
Komag
Posts: 739
Joined: Fri Aug 22, 2014 3:42 am

Re: global as a reserved word

Wed Oct 03, 2018 6:55 am

Good to know. I guess you can just call it globl or something like that. :)
 
User avatar
lkrocek
Topic Author
Posts: 20
Joined: Wed Mar 28, 2018 4:04 am
Contact:

Re: global as a reserved word

Wed Oct 03, 2018 8:02 am

I have no problem with naming :D I just don't like it's undocumented. Nobody knows.
Platforms integration specialist
====================
@ https://suite.st/
 
renojim
** Valued Community Member **
Posts: 3348
Joined: Mon Feb 15, 2010 1:35 pm

Re: global as a reserved word

Wed Oct 03, 2018 8:39 am

This was from one of the original BrightScript Reference Manuals (PDF):

"BrightScript does not support global variables. Except, there is one hard-coded global
variable "global" that is an interface to the global BrightScript Component. The global
component contains all global library functions. "

I don't know if that made it into the online version of the documentation or not.

-JT
 
User avatar
lkrocek
Topic Author
Posts: 20
Joined: Wed Mar 28, 2018 4:04 am
Contact:

Re: global as a reserved word

Thu Oct 04, 2018 1:10 am

renojim wrote:
This was from one of the original BrightScript Reference Manuals (PDF):

"BrightScript does not support global variables.  Except, there is one hard-coded global
variable "global" that is an interface to the global BrightScript Component.  The global
component contains all global library functions. "

I don't know if that made it into the online version of the documentation or not.

-JT

Wow! there is a manual?! :D even is more complex then roku online docs, thanks a lot! but still it could be updated in sdkdocs, please.
Platforms integration specialist
====================
@ https://suite.st/
 
joetesta
Posts: 769
Joined: Wed Apr 20, 2011 11:48 am

Re: global as a reserved word

Thu Oct 04, 2018 2:56 pm

If you post a comment in here https://forums.roku.com/viewtopic.php?f=34&t=69731 a fairy or gremlin might come along and fix it 
aspiring
 
User avatar
RokuNB
Posts: 433
Joined: Fri Mar 31, 2017 2:22 pm

Re: global as a reserved word

Fri Oct 05, 2018 10:50 am

lkrocek wrote:
Wow! there is a manual?! :D even is more complex then roku online docs, thanks a lot! but still it could be updated in sdkdocs, please.

that's between the lines in
https://sdkdocs.roku.com/display/sdkdoc ... ture-Scope
 
renojim
** Valued Community Member **
Posts: 3348
Joined: Mon Feb 15, 2010 1:35 pm

Re: global as a reserved word

Fri Oct 05, 2018 10:47 pm

I figured if anyone could find it in the online docs RokuNB could. Searching the old PDF for "global" I found the passage in a matter of seconds. Searching online... well, I never did find it in the 30+ seconds I allocated for the search. :-) I'm just not willing to do a search and then another within those search results.

-JT

Who is online

Users browsing this forum: No registered users and 3 guests