Remote-processing CAMBASIC Manual de usuario Pagina 66

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 208
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 65
Commands - 33
DIM
Statement
SYNTAX: DIM variable (value) [,variable (value)] . . .
PURPOSE: To specify the maximum size for array variables and reserve m emory accor dingly.
REMARK S: The DIM statement sets all elements of the specified numerical arrays to an initial value of zero.
String array elements are of variable length, with an initial value of zero (null).
The default value is 11 for numerical values and 253 for strings. This means that the numerical
array subscripts for 0 to 10 are allowed. The number of subscripts is always one more than the
dimension. The m aximum number of dimensions for an array is 255.
NOTE: When CLEAR is executed, all dimensioned arrays are redim ensioned to 11
(0– 10).
NOTE: String arrays are single dimension only.
Unlike scalar variables, dimensioned array names use only the first and last letters. A variable name
PUMP(n) is seen as the same as PP(n) and returns the same number.
EXAMPLE: The following dimensions a single dimension numeric and string array:
10 DIM A(25), A$(30)
The following dimensions a numeric array w ith three dimensions:
20 DIM B(10,10,10)
ERROR: < Out of memory> if dimensioned space exceeds memory
< Data negative> if value is negative
< Array already dimensioned> if an attempt is made to redimension an array or dimension an
array that has alr eady been refer enced in the e xecution path
Vista de pagina 65
1 2 ... 61 62 63 64 65 66 67 68 69 70 71 ... 207 208

Comentarios a estos manuales

Sin comentarios