Tim,
one solution that immediately jumps to mind is to use a counter to skip
over the header lines as follows:
'Assuming that the file is already open as #1.....
dim str_header, str_data as string
dim counter, num_header_lines as smallint
num_header_lines = 4 '(or whatever)
for counter = 1 to num_header_lines
line input #1, str_header
'do nothing as we arent interested in this data
next
'now start with the real data
do while not eof(1)
line input #1, str_data
'....do some stuff to process the data here
loop
close file #1
hope this helps,
Darren
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Tim Warman
> Sent: Friday, 4 June 1999 8:55
> To: MapInfo List
> Subject: MI custom text import routine
>
>
> Listers,
>
> As part of an application I'm writing in VB I need to import a
> type of text
> file that contains some header lines. The number of header lines is always
> constant, and I don't need the info they contain. I want to use the "line
> input #" statement to read in the data lines below the header, but I'm
> wondering if there is a way to tell the program to start reading the text
> file at a specific line number so that it skips over the header lines.
>
> Any suggestions would be greatly appreciated.
>
> Cheers,
> _____________________________
> Tim Warman MSc
> Exploration Geologist
> Manson Warman Assoc.
> Toronto (416) 367-4571 ex. 241
> Los Angeles (310) 207-0781
> ----------------------------------------------------------------------
> To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
> "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
>
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]