Brightsign HD2000 BrightScript Reference Guide User Manual

Browse online or download User Manual for Equipment Brightsign HD2000 BrightScript Reference Guide. BrightSign HD2000 BrightScript Reference Guide User Manual

  • Download
  • Add to my manuals
  • Print

Summary of Contents

Page 1

1 Roku BrightScript Reference Matches HD600 Software Version: 1.1.28 Matches HD2000 Software Version: 1.1.20 Palo Alto, CA USA

Page 2 - Table of Contents

10 RUN .6666666865348816 Assigning Double-Precision Values Here are three ways to be sure double-precision values are stored without any trailing

Page 3

11 Not including the built-in string functions, there is only one string operation - concatenation, represented by the plus symbol +. Example Progr

Page 4 - Introduction

12 Program Statements Type Definition Assignment & Allocation Sequence of Execution (Conditional Statements) DEFINT CLEAR END IF

Page 5 - Variable Names

13 To re-dimension an array, you must first use a CLEAR statement LET variable = expression May be used when assigning values to variables. Roku Br

Page 6

14 RETURN PRINT "ERROR!":STOP queen: PRINT "queen!" RETURN Ends a subroutine and returns control to the statement immediately

Page 7 - Order of Operations

15 FOR I=10 TO 1 STEP -1 PRINT I; NEXT RUN 10 9 8 7 6 5 4 3 2 1 FOR I=1TO3 PRINT"OUTER LOOP" FOR J=1 TO 2 PRINT"

Page 8 - String Operators

16 Use ON ERROR GOTO 0 to deactivate the ON ERROR. RESUME line number Terminates an error handling routine by specifying where normal execution is

Page 9 - Type Conversion (Promotion)

17 THEN statement or line number or line label Initiates the "action clause" of an IF-THEN type statement. THEN is optional except when it

Page 10 - Strings

18 DATA item list Lets you store data inside your program to be accessed by READ statements. The data items will be read sequentially, starting wi

Page 11 - Hex and Octal

19 RESTORE Causes the next READ statement executed to start over with the first item in the first DATA statement. This lets your program re-use the

Page 12 - Program Statements

2 Table of Contents INTRODUCTION ...4 QUICK EXAMPLE..

Page 13 - LET variable = expression

20 Console Statements The statements described in this section let you send and receive strings and character to consoles. Currently the only conso

Page 14 - RETURN

21 10 PRINT "PRINT STATEMENT #10 "; 20 PRINT "PRINT STATEMENT #20" RUN PRINT STATEMENT #10 PRINT STATEMENT #20 A trailing semi-c

Page 15 - ON ERROR GOTO line number

22 You may then enter the values all at once or one at a time. To enter values all at once, separate them by commas. (If your string literal includes

Page 16 - RESUME line number

23 ListDir(path) Returns a roLIST object containing the contents of the directory path specified. All files names are converted to all lowercase F

Page 17

24 Built-in String Functions ASC MID CHR RIGHT INSTR STR INKEY STRING LEN VAL LEFT READASCIIFILE ASC (string) Returns the ASCII code

Page 18 - DATA item list

25 MID (string, p, [n]) Returns a substring of string with length n and starting at position p. n may be omitted, in which case the string starting

Page 19 - RESTORE

26 140 OLDS=OLD$+CHR$(CD) 150 NEXT 160 PRINT "THE DECODED MESSAGE IS" 170 PRINT OLD$

Page 20 - Console Statements

27 Built-in Arithmetic Functions BrightScript offers a wide variety of intrinsic ("built-in") functions for performing arithmetic and spec

Page 21 - LINEINPUT string variable

28 LOG(x) Returns the natural logarithm of the argument, that is, loge(argument ). This is the inverse of the EXP function, so X=LOG(EXP (X)). To f

Page 22 - POS(x)

29 ERR Similar to ERL, except ERR returns a value related to the code of the error rather than the line in which the error occurred. Commonly used in

Page 23

3 BUILT-IN ROKU OBJECT AND MISCELLANEOUS FUNCTIONS...22 WAIT (TIMEOUT, OBJECT)...

Page 24 - Built-in String Functions

30 Reserved Words @ ERL ERR AND FOR POS CLEAR CLS PRINT CMD GOSUB RANDOM CONT GOTO READ DATA IF REM DEFDBL INPUT RESET DEFF

Page 25

4 Introduction Roku BrightScript is a scripting language based on Basic. It is easy to learn, and when combined with Roku Objects, it allows devel

Page 26

5 Line Numbers and Statement Separator BrightScript lines may have optional line numbers. For example, the following two examples of code are the sa

Page 27

6 super_man$ Types All variables and values have a “type”. The type of a variable is stored along with its value. The following types are used by R

Page 28

7 BrightScript> ?type(d) rotFLOAT Type Declaration Characters Character Type Examples $ String A$, ZZ$ % Integer A1%, SUM% ! Si

Page 29

8 Exponentiation: A ^ B Negation: –X *, / (left to right) +, – (left to right) <, > , =, <=, >=, <> (left to right) NOT AND OR .

Page 30 - Reserved Words

9 Examples: 1.234567 - float 5 - int 1.0 - float 1.0# - double 12345678900 - double 1% - int 1! - float 1# - double 1E0 – float 1D0 – d

Comments to this Manuals

No comments