Appending to a "sequence"

new topic     » topic index » view thread      » older message » newer message

This code errors on the "append(line, '{')"  statement
Can we not append an atom to a sequence ?

sequence line
sequence recd 	
   fn=open("tml_extract.txt","r")
   if fn < 1 then
  	puts(1, "Unable to open the disk file\n")
        abort(fn)
   else 
     while 1 do 
        line = {}
        append(line, '{')
        recd = gets(fn)
        if atom(recd) then exit
        else  
          if equal(recd[2..5], "%HDR") or equal(recd[2..5], "%TRL") then
          	 a = 0
          else
            append(line, recd) 
            append(line, '}')
            ---puts(1, recd[1] recd[2] & "\n") 
            puts(1, line[2]  & "\n")
          end if
        end if
     end while
   end if     


new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu