Instruci贸n Put#

Escribe un rexistro nun ficheiro relativo ou unha secuencia de bytes nun ficheiro binario.

tip

Use Print# statement to print data to a sequential text file. Use Write# statement to write data to a sequential text file with delimiting characters.


Sintaxe:

Put Statement diagram


Put [#]fileNum, [recordNum|filePos], variable

Par谩metros:

fileNum: Any integer expression that defines the file that you want to write to.

recordNum, filePos: For relative files (random access files), the number of the record that you want to write.

En ficheiros binarios (acceso binario), a posici贸n do byte no ficheiro onde desexa iniciar a escritura.

variable: Name of the variable that you want to write to the file.

Note for relative files: If the contents of this variable does not match the length of the record that is specified in the Len clause of the Open statement, the space between the end of the newly written record and the next record is padded with existing data from the file that you are writing to.

Nota para ficheiros binarios: O contido das vari谩beis escr铆bese na posici贸n especificada, e o apuntador do ficheiro ins铆rese directamente despois do 煤ltimo byte. Non permanece ning煤n espazo entre os rexistros.

Exemplo:

Precisamos da s煤a axuda!