Brightsign BrightScript 3.0 Reference Manual Manuel d'utilisateur Page 37

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 75
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 36
32
Example: The first statement will include a library in the same folder as the script, while the second will include a library in
a sub-folder.
LIBRARY "myBSL1.brs"
LIBRARY "new_lib/myBSL2.brs"
Example: The following statement will include the bslCore.brs library, which has some useful BrightScript features, from
the SYS:/script-lib/ directory.
LIBRARY "v30/bslCore.brs"
DIM
DIM Name (dim1, dim2, …, dimK)
The DIM (“dimension”) statement provides a shortcut for creating roArray objects. It sets the variable Name to type
“roArray”. It can create arrays of arrays as needed for multi-dimensionality. The dimension passed to DIM is the index of
the maximum entry to be allocated (i.e. the array initial size = dimension+1), though the array will be resized larger
automatically if needed.
Example: The following two lines create identical arrays.
Dim array[5]
array = CreateObject(“roArray”, 6, true)
Note: The expression x[a,b] is identical to x[a][b].
Example: The following script demonstrates useful operations on a DIM array.
Dim c[5, 4, 6]
Vue de la page 36
1 2 ... 32 33 34 35 36 37 38 39 40 41 42 ... 74 75

Commentaires sur ces manuels

Pas de commentaire