Brightsign HD2000 BrightScript Reference Guide Manuale Utente Pagina 5

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 30
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 4
5
Line Numbers and Statement Separator
BrightScript lines may have optional line numbers. For example, the following two examples of code are the
same:
10 hello=-1
20 if hello=-1 then print “hello there!!”
30 goto 20 ‘ loop and print forever!
hello=-1
loop_here:
if hello=-1 then print “hello there!!”
goto loop_here ‘ loop and print forever!
In BrightScript, if you wish to put multiple statements on a single line, separate them with a : (colon).
For example:
Hello=”hello there!”:print hello
Expressions, Variables, and Constants
Expression Summary
An expression is a combination of variables, constants, and functions that can evaluate to a value. The value
will also have a type.
For example:
Roku> script
BrightScript Micro Debugger.
Enter any BrightScript statement, debug commands, or HELP.
BrightScript> ?5+1
6
BrightScript> ? 2.1 - 2
0.0999999
BrightScript> days=5
BrightScript> ?days+2
7
BrightScript> ?"hello"+" "+"there"
hello there
Variable Names
Variable names
must start with an alphabetic character (a – z)
may consist of alphabetic characters, numbers, or the symbol “_” (underscore)
may end with an optional type designator.
are not case sensitive
may be of any reasonable length
may not use a “reserved word” as the name (see appendix for list of reserved words).
For example:
a
boy5
Vedere la pagina 4
1 2 3 4 5 6 7 8 9 10 ... 29 30

Commenti su questo manuale

Nessun commento