I have problem already. In the following code I tests whether 'j' is a list, and if so I ask for a count of it and print the result. Every time I run it, it fails with a "ERR: list expected in function count : nil".
c:\temp\data is a text file containing crlf-delimited lines of two tab-delimited items.
Here's the code
Code: Select all
(dolist
(i
(parse
(read-file "c:\\temp\\data") "\r\n"
)
)
(begin
(set 'j (reverse (parse i "\t")))
(print j "\n")
(when (list? j)
(print (count j) "\n")
)
(set 'k (j 0))
(set 'l (j 1))
)
)
Kind regards,
Bruce.
P.S. Is there a way of assigning (j 0) to k and (j 1) to l in one statement, i.e. does newLISP permit double (or more) assignment?