![]() Date literals are written using standard short date ' True, False, Null, and Error are translated using locale settings of MyBool = False : MyDate = #February 12, 1969# : MyNull = Null ![]() ' Assign Boolean, Date, Null and Error values. Print #1, Tab(10) "Hello" ' Print word at column 10. Print #1, Spc(5) "5 leading spaces " ' Print five leading spaces. Print #1, "Hello" " " "World" ' Separate strings with space. Print #1, "Zone 1" Tab "Zone 2" ' Print in two print zones. Print #1, "This is a test" ' Print text to file. Open "TESTFILE" For Output As #1 ' Open file for output. This example uses the Print # statement to write data to a file. Using Write # also ensures that it can be correctly read in any locale. Using Write # ensures the integrity of each separate data field by properly delimiting it, so that it can be read back in by using Input #. If, at some future time, you want to read the data from a file by using the Input # statement, use the Write # statement instead of the Print # statement to write the data to the file. If you use Tab with no arguments to move the print position to the next print zone, Print # also writes the spaces between print fields to the file. The Error keyword is not translated regardless of the locale.Īll data written to the file by using Print # is internationally-aware that is, the data is properly formatted by using the appropriate decimal separator.īecause Print # writes an image of the data to the file, you must delimit the data so that it prints correctly. However, if outputlist data is Null, Null is written to the file.įor Error data, the output appears as Error errorcode. Nothing is written to the file if outputlist data is Empty. When either the date or the time component is missing or zero, only the part provided gets written to the file. The True and False keywords are not translated, regardless of the locale.ĭate data is written to the file by using the standard short date format recognized by your system. A space has the same effect as a semicolon.įor Boolean data, either True or False is printed. Multiple expressions can be separated with either a space or a semicolon. If you omit outputlist and include only a list separator after filenumber, a blank line is printed to the file. ![]() If charpos is omitted, the next character is printed on the next line.ĭata written with Print # is usually read from a file with Line Input # or Input #. Use Tab with no argument to position the insertion point at the beginning of the next print zone. Use Tab( n) to position the insertion point to an absolute column number. Use a semicolon to position the insertion point immediately after the last character displayed. Specifies the insertion point for the next character. Numeric expressions or string expressions to print. Used to position the insertion point to an absolute column number, where n is the column number. Used to insert space characters in the output, where n is the number of space characters to insert. Expression or list of expressions to print. The Print # statement syntax has these parts: Part Writes display-formatted data to a sequential file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |