CREATE ASCIICreates a LIF ASCII file.
Description:
The CREATE ASCII statement creates a LIF ASCII file of specified length on the mass storage media, in the specified directory or in the current working directory. CREATE ASCII does not open files; use ASSIGN to open files. Since Windows supports extendable files, the file is created with a length of zero, but a CAT listing shows the number of records specified in the CREATE.
HTBasic supports typed files as well as regular files. HTBasic file types are LIF ASCII, BDAT, BIN and PROG. In a CAT listing, LIF ASCII files are listed as "ASCII" files.
A utility program, HPCOPY, is provided for most versions of HTBasic to transfer LIF ASCII files between HP LIF diskettes and DOS disks. Data can also be transferred between HTBasic and Series 200/300 computers by attaching an interface between the computers and writing a short program on each computer to transfer the data. Programs can be transferred in ASCII using either of these methods.
Do not confuse the terms ASCII (DOS ASCII, NT ASCII orUNIX ASCII), and LIF ASCII. A Windows ASCII file is a regular file which contains only printable characters, and the end of each line is marked with a carriage return and line feed. A UNIX ASCII file is a regular file which contains only printable characters and the end of each line is marked with a line feed. A LIF ASCII file is a typed file which contains string items preceded by an item length and followed by a pad byte when the string length is odd. When the term "ASCII" is used in the HTBasic manual set or in a CAT listing, it refers to LIF ASCII. When the term is used outside the manual set, you will need to determine for yourself what kind of ASCII is spoken of.
File Headers
As opposed to regular files, typed files have a header containing necessary information about the file. The presence of the header is transparent to BASIC programs and no action should be taken to account for it. HTBasic can work with files that have either an HTB or an HP LIF file header. The HTB file header is 256 bytes. The HP LIF file header is 512 or 768 bytes.
The CONFIGURE CREATE statement determines which kind of header is created by this statement. By default, HTB file headers are created.
See Also:
|