1. Re: Reading a file into a "sequence"...correction

John F Dutcher wrote:
> 
> I see the immediate problem...the statement
> 
>              puts(1, line & "\n")
> needs to be  puts(1, line[1] & "\n") (or some such)
> 
> This leads to a new error:
> 
>               C:\EuphoriaMyScripts\ThirdMill2.exw:80
>               type_check failure, line is 0 

Declare line as an object. Then, before using it as a sequence, test
to see if it is indeed a sequence.

if sequence(line) then...

This may be happening because the second line (below) is empty or blank.

> on the 2nd input line of the file...the 1st two lines are:
> 
> "%HDR","EXTRACT","11/17/2004 02:23:10 AM","UNIVERSITY OF ROCHESTER MEDICAL
>  CENTER"
> 
> "%DTL","000061474714","000001821707","BARNES","CHARLES","","03/31/2001",
> "03/20/2001","03/20/2001","000001819.00","000000000.00","11/07/2004",
> "E3R                           ","000001819.00","A1O","   ","86115",
> "YJP115341192","     ","10549",,,,,,,"86","EMG ","C"," "

-=ck
"Programming in a state of EUPHORIA."
http://www.cklester.com/euphoria/

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu