|
|
|||||||
Using the example right out of the manual to readline in a file. When I run the script, the "0" error code is echoed in the display. How do you suppress that? Here's the sample right out of manual, modified slightly.thx If Open(10, "C:\testlog.txt") = 0 ;$x = ReadLine(10) ;WHILE @ERROR = 0 ; ? $x ; $x = ReadLine(10) ; LOOP Close (10) ELSE BEEP ? "Config file not opened, error code: [" + @ERROR + "]" Endif |
||||||||
|
|
|||||||
Trap (silence) your Close function return code, like this: $Null = Close (10) -Shawn |
||||||||
|
|
|||||||
Thank-you very much. I love this forum! |
||||||||
|
|
|||||||
BTW, there are ready-made UDFs in the UDF Forum to read a complete text file into an array for further processing, e.g. ReadFile() - Read a file into an array . |