You can customize where the file data is by initializing FileRec record (for untyped binary files) or TextRec record (for text files), instead of calling standard AssignFile ( Assign) routines. In some cases, actual memory can be defined as a file this was used in the case of a ram disk. A file may be a screen and/or keyboard, a modem, a light pen, a touch screen, a mouse, an area of storage on disk, a socket for connecting to the Internet, or it could be some other device depending on how the run-time library ties the file. At the end, release the necessary file resources (and possibly flush the data to be written) by calling CloseFile (older, equivalent name: just Close).Ī file variable is used either for input, for output, or for both input and output (I/O).Following is the declaration of an array of pointers to an integer type iptr integer var parray: array 1. There may be a situation, when we want to maintain an array, which can store pointers to integers or characters or any other data type available. For untyped binary files, use BlockRead and BlockWrite. Pascal allows defining an array of pointers. Some Pascal Compilers also used the Get and Put routines for I/O. ![]()
0 Comments
Leave a Reply. |