LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

mysterious error 85 and Scan from File

I am writing a file to parse text files.
I want to use Scan from File and read line by line.
Attached is a simple LV 7.1 (converted to 7.0) with a sample file.
The sample text file was created with ImageJ, and my hex editor says
that it uses \r\n for the end-of-line characters, so I have used the format string
%[^\r\n]\r\n
to get the text for one line.
Every time you press Read line, you will get the correct string, but also
an error 85.
The funny thing is that it also works with the format string
%[^\n\r]\n\r
 
Anyone have any insight to this mystery?
 
mlewis
 
0 Kudos
Message 1 of 2
(3,444 Views)
I have some insight into at least the second half of your query. The reason %[^\r\n]\r\n and %[^\n\r]\r\n both work is that the brackets form a character set for the search. They don't specify that the search has to be in any particular order. I believe that [^\n\r] means anything before either a carriage return or line feed. The LV help for the format specifier string has this to say:

%[^,;]—Matches any string of characters up to but not including the first comma or semicolon.

In any case, after playing around I found that the format string %[^\r]\n seems to do what you want with no error 85. But I'm also not 100% sure what you want the output to be.
Jarrod S.
National Instruments
0 Kudos
Message 2 of 2
(3,429 Views)