Denso BHT-200QW Especificaciones Pagina 123

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 587
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 122
Chapter 8. Files
115
8.2.5 Programming for Data Files
Input/Output for Numeric Data
Input/Output for Numeric DataInput/Output for Numeric Data
Input/Output for Numeric Data
- To write numeric data into a data file:
It is necessary to use the STR$ function for converting the value of a numeric expression into
a string.
To write -12.56 into a data file, for example, the field length of at least 6 bytes is required.
When using the FIELD statement, designate the sufficient field length; otherwise, the data will
be lost from the lowest digit when written to the field.
- To read data to be treated as a numeric from a data file:
Use the VAL function for converting a string into a numeric value.
Data Retrieval
Data RetrievalData Retrieval
Data Retrieval
The SEARCH function not only helps you make programs for data retrieval efficiently but also
makes the retrieval speed higher.
The SEARCH function searches a designated data file for specified data, and returns the
record number where the search data is first encountered. If none of the specified data is
encountered, this function returns the value 0.
Deletion of Data Files
Deletion of Data FilesDeletion of Data Files
Deletion of Data Files
The CLFILE or KILL statement deletes the designated data file.
CLFILE
Erases only the data stored in a data file without erasing its directory information, and
resets the number of written records to 0 (zero) in the directory. This statement is valid
only to opened data files.
KILL
Deletes the data stored in a data file together with its directory information. This
statement is valid only to closed data files.
Program sample with the CLFILE statement
OPEN "work2.DAT"AS #1
FIELD #1,1 AS a$
CLFILE #1
CLOSE #1
Program sample with the KILL statement
CLOSE
KILL "work2.DAT"
Vista de pagina 122
1 2 ... 118 119 120 121 122 123 124 125 126 127 128 ... 586 587

Comentarios a estos manuales

Sin comentarios