Brightsign BrightScript 3.0 Reference Manual Manual do Utilizador Página 11

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 75
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 10
6
BrightScript> ?type(d)
String
BrightScript> d=1
BrightScript> ?type(d)
Integer
BrightScript> d=1.0
BrightScript> ?type(d)
Float
Type Declaration Characters
A type declaration may be used at the end of a variable or literal to fix its type. Variables with the same identifier but
separate types are separate variables: For example, defining a$ and a% would create two independent variables.
Character Type Examples
$ String A$, ZZ$
% Integer A1%, SUM%
! Single-Precision (Float) B!, N1!
# Double-Precision (Double) A#, 1/3#, 2#
Literals (Constants)
The following are valid literal types:
Type Boolean: Either True or False
Type Invalid: Invalid only
Type String: A string in quotes (e.g. "This is a string")
Type Integer: An integer in hex (e.g. HFF) or decimal (e.g. 255) format
Vista de página 10
1 2 ... 6 7 8 9 10 11 12 13 14 15 16 ... 74 75

Comentários a estes Manuais

Sem comentários