TEXT$Import()

Description

TEXT$Import() is used to import a text file into an EASI multi-line string variable.

Call Signature

mstring TEXT$Import ( string filename )

Return Value

mstring

The returned value is the number of bytes written to the tape, which should match the buffer size. If the import fails, the returned mstring will have an F$LEN() of zero.

Argument

string filename:

A string expression evaluating to the name of the file to be imported.

Example


 local string file_name
 local mstring creport
 local mstring vlist
 local integer i

 vlist[1] = "The first line."
 vlist[2] = "The second line."
 vlist[3] = "The third line."

 try
    file_name = TmpNam()

    call TEXT$Export( file_name, vlist )
    creport = Text$Import( file_name )

    for i = 1 to 3
       print creport[i]
    endfor

    del file_name
 onerror
    print "Error: ", GetLastErrorMessage()
 endonerror


Output:


 The first line.
 The second line.
 The third line.

Deprecated

Use TEXTImport()

See also

Text file functions

TEXT$Export()

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.