picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

ht.l (1110B)


      1 # 07jun12abu
      2 # (c) Software Lab. Alexander Burger
      3 
      4 ### ht:Prin ###
      5 (test "1<2>3&äöü<i>ÄÖÜß"
      6    (pipe (ht:Prin "1<2>3&äöü<i>ÄÖÜß") (line T)) )
      7 
      8 
      9 ### ht:Fmt ###
     10 (test "+123&abc&$def&-123&_+1_xyz_+7"
     11    (ht:Fmt 123 "abc" 'def '{123} (1 "xyz" 7)) )
     12 
     13 
     14 ### ht:Pack ###
     15 (test "A+B C"
     16    (ht:Pack '("A" "+" "B" "%" "2" "0" "C")) )
     17 (test "a b>c"
     18    (ht:Pack '("a" "%" "2" "0" "b" "&" "g" "t" ";" "c")) )
     19 (test "a€z"
     20    (ht:Pack '("a" "&" "#" "8" "3" "6" "4" ";" "z")) )
     21 (test "äöü"
     22    (ht:Pack '("%" "C" "3" "%" "A" "4" "%" "C" "3" "%" "B" "6" "%" "C" "3" "%" "B" "C")) )
     23 
     24 
     25 ### ht:Read ###
     26 (test NIL
     27    (pipe (prin "abcde") (ht:Read 0)) )
     28 (test NIL
     29    (pipe (prin "abcde") (ht:Read 6)) )
     30 (test NIL
     31    (pipe NIL (ht:Read 3)) )
     32 (test NIL
     33    (pipe (prin "äö") (ht:Read 3)) )
     34 (test '("ä" "ö")
     35    (pipe (prin "äö") (ht:Read 4)) )
     36 (test '("a" "b" "c")
     37    (pipe (prin "abcde") (ht:Read 3)) )
     38 (test '("ä" "ö" "ü")
     39    (pipe (prin "äöüxyz") (ht:Read 6)) )
     40 
     41 
     42 ### ht:In ht:Out ###
     43 (test "Hello world"
     44    (pipe (ht:Out T (prinl "Hello world")) (ht:In T (line T))) )
     45 
     46 # vi:et:ts=3:sw=3