[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] awk.egg question
From: |
Patrick Giagnocavo 717-201-3366 |
Subject: |
[Chicken-users] awk.egg question |
Date: |
Mon, 26 Dec 2005 23:34:17 -0500 |
I am trying to determine whether or not the awk.egg is working properly on my
system.
Solaris/x86, Chicken 2.207
Running
cat /etc/passwd | csi -R awk -s awk-egg-test.scm
Gets me a page and a half of traceback, starting with:
Error: unbound variable: string-split-fields
The file I am using, contains the "sort password" example from the awk.egg web
page:
(require-extension awk)
(define (read-passwd . port)
(let ([line (apply read-line port)])
(if (eof-object? line)
(values line #f)
(values line (string-split-fields ":" line #:infix)) ) ) )
(for-each
(lambda (entry) (print (cdr entry)))
(sort
(awk (read-passwd) (line fields) ([ans '()])
(#t (cons (cons (car fields) line) ans)) )
(lambda (x y) (string<? (car x) (car y))) ) )
(removing the require-extension line does not change the script's behavior)
Suggestions, comments, code to try out welcome.
Also, I suggest that tests be packaged along with the eggs (where appropriate)
that can be used to show that the egg is working as expected.
Cordially
Patrick Giagnocavo
address@hidden
- [Chicken-users] awk.egg question,
Patrick Giagnocavo 717-201-3366 <=