repo.or.cz
/
newlisp.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Initial commit of newLISP.
[newlisp.git]
/
guiserver
/
word-count.lsp
blob
de3e0271236d1cf978ff9e01e4765e90865d764e
1
;; demo script: word-count.lsp
2
;; this script is registered in the Tool menu of newlisp-edit.lsp
3
4
(
set
'
content
(
read-file
(
main-args
2
)))
5
6
(
println
7
"Words: "
(
length
(
find-all
"
\\
w+"
content
))
8
" Bytes: "
((
file-info
(
main-args
2
))
0
))
9
10
(
exit
)