all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 additions and 0 deletions
24
Task/Text-processing-2/PicoLisp/text-processing-2.l
Normal file
24
Task/Text-processing-2/PicoLisp/text-processing-2.l
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/picolisp /usr/lib/picolisp/lib.l
|
||||
|
||||
(load "@lib/misc.l")
|
||||
|
||||
(in (opt)
|
||||
(until (eof)
|
||||
(let Lst (split (line) "^I")
|
||||
(unless
|
||||
(and
|
||||
(= 49 (length Lst)) # Check total length
|
||||
($dat (car Lst) "-") # Check for valid date
|
||||
(not
|
||||
(find # Check data format
|
||||
'((L F)
|
||||
(not
|
||||
(if F # Alternating:
|
||||
(format L 3) # Number
|
||||
(>= 9 (format L) -9) ) ) ) # or flag
|
||||
(cdr Lst)
|
||||
'(T NIL .) ) ) )
|
||||
(prinl "Bad line format: " (glue " " Lst))
|
||||
(bye 1) ) ) ) )
|
||||
|
||||
(bye)
|
||||
Loading…
Add table
Add a link
Reference in a new issue