viernes, 25 de marzo de 2011

tipos de archivo

Como se muestra en el ejemplo anterior, Pascal archivos son secuencias de componentes. Every file has a buffer variable which is denoted by f^ . Cada archivo tiene una variable de amortiguamiento que se denota por f ^. The procedures get (for reading) and put (for writing) move the buffer variable to the next element. Los procedimientos get (para leer) y poner (por escrito) mover la variable de búfer en el elemento siguiente. Read is introduced such that read(f, x) is the same as x:=f^; get(f); . Lea se introduce de tal manera que leer (f, x) es el mismo que x: = f ^; get (f);. Write is introduced such that write(f, x) is the same as f^ := x; put(f); The type text is predefined as file of char. Escribir es introducido de tal manera que escribir (f, x) es el mismo que ^ f: = x; put (f) El tipo de texto está predefinido como un archivo de caracteres. While the buffer variable could be used for inspecting the next character to be used (check for a digit before reading an integer), this leads to serious problems with interactive programs in early implementations, but was solved later with the "lazy I/O" concept. Si bien la variable de amortiguamiento podría ser utilizado para inspeccionar el siguiente carácter que se utilizará (marque un dígito antes de leer un número entero), esto conduce a serios problemas con programas interactivos en las primeras implementaciones, pero se resolvió más tarde con el "perezoso I / O" concepto.
In Jensen & Wirth Pascal, strings are represented as packed arrays of chars; they therefore have fixed length and are usually space-padded. En Jensen & Wirth Pascal, las cadenas se representan como matrices de relleno de caracteres, por lo tanto tienen una longitud fija y por lo general el espacio acolchado. Some dialects have a custom string type. Algunos dialectos tienen un tipo de cadena personalizada.

No hay comentarios:

Publicar un comentario