summaryrefslogtreecommitdiff
path: root/ipl/packs/loadfuncpp/examples/hexwords_oneline.icn
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-01-28 19:02:21 +0000
committerIgor Pashev <pashev.igor@gmail.com>2013-01-28 19:02:21 +0000
commitf627f77f23d1497c9e1f4269b5c8812d12b42f18 (patch)
tree708772d83a8355e25155cf233d5a9e38f8ad4d96 /ipl/packs/loadfuncpp/examples/hexwords_oneline.icn
parent6ab0c0f5bf14ed9c15370407b9ee7e0b4b089ae1 (diff)
downloadicon-upstream.tar.gz
Imported Upstream version 9.5.0upstream/9.5.0upstream
Diffstat (limited to 'ipl/packs/loadfuncpp/examples/hexwords_oneline.icn')
-rw-r--r--ipl/packs/loadfuncpp/examples/hexwords_oneline.icn8
1 files changed, 8 insertions, 0 deletions
diff --git a/ipl/packs/loadfuncpp/examples/hexwords_oneline.icn b/ipl/packs/loadfuncpp/examples/hexwords_oneline.icn
new file mode 100644
index 0000000..6e11041
--- /dev/null
+++ b/ipl/packs/loadfuncpp/examples/hexwords_oneline.icn
@@ -0,0 +1,8 @@
+procedure printable(word)
+ return "" == word | map(map(word, "oOiIzZeEsStT", "001122335577"), &lcase, &ucase);
+end
+procedure main()
+ find := '0123456789abcdefABCDEFoOiIzZeEsS';
+ words := open(word_file := "/usr/share/dict/words") | stop("Unable to open: " || word_file);
+ every write(printable( | 1 ( | (word := trim(read(words))) , not("" == word) , ('' == word -- find))));
+end