Metrologic IS1000 Series Guia do Utilizador Página 46

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 198
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 45
40
CipherLab BASIC Compiler
User's Guide
VALR
Purpose
To convert a string expression to a real number.
Syntax
A! = VALR(X$)
Remarks
"A!" is a real number variable to be assigned to the result.
"X$" is a string that includes numeric characters. The precision of the converted
result is governed by the "SET_PRECISION" function.
Example
A! = VALR("123.45")
PRINT "A = ", A!
...
REM A = 123.45
5.4.7 Creating Strings of Repeating Characters
STRING$
Purpose
To return a string containing the specified number of the requested character.
Syntax
A$ = STRING$(N%, X$)
A$ = STRING$(N%, J%)
Remarks
"A$" is a string variable to be assigned to the result.
"N%" is a numeric expression in the range of 0 to 255, indicating the number of a
character.
"J%" is a numeric expression in the range of 0 to 255, indicating the ASCII code of
a character.
"X$" may be a string variable or string constant.
Example
IDX_LENGTH% = 20
Data$ = Name$ + STRING$(IDX_LENGTH% - LEN(Name$)," ")
ADD_RECORD$(1,Data$)
' padding with space if the length of Name$ is less than IDX_LENGTH%
Vista de página 45
1 2 ... 41 42 43 44 45 46 47 48 49 50 51 ... 197 198

Comentários a estes Manuais

Sem comentários