Saltar al contenido

Archivos de texto

English

Data that stays after the program ends

  • A variable is lost when the program stops. A text file keeps its lines, so the next run can read them.
  • AS topic 10.3 asks for pseudocode that writes, appends and reads a text file of one or more lines.
  • Every file job has the same three parts: open it in one mode, use it, close it.

FOR WRITE starts the file empty, FOR APPEND adds at the end, FOR READ reads from the first line; every job is OPENFILE, READFILE or WRITEFILE, then CLOSEFILE

Material

Iniciar sesión o crear cuenta

IGCSE, A-Level & AP