Print # statement - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Writes data to a file opened in a Sequential mode (Output or Append).

Syntax

Print # file_num [ , expr ] 

file_num is the number of a file opened through the Open File statement.

expr is an expression to write to the file.

Description

The Print # statement writes data to an open file. The file must be open and in a sequential mode which allows output (Output or Append).

The file_num parameter corresponds to the number specified in the As clause of the Open File statement.

MapInfo Pro writes the expression expr to a line of the file. To store a comma-separated list of expressions in each line of the file, use the Write # statement instead of Print #.

See Also:

Line Input statement, Open File statement, Write # statement