C question about scanf

Christos Ricudis ricudis at paiko.gr
Thu Sep 16 11:09:20 EEST 1999


Hello Linux-greek-users!

  On 16 Sep 99, Linux-greek-users wrote to Giorgos Keramidas with subject "Re:
C question about scanf":

 >> Xrhsimopoieis perl, kai oute pou koitas thn C.

 L> Aμα είναι να το πάμε έτσι, κι εγώ θα σου πω: χρησιμοποιείς
 L> scheme, και ούτε που κοιτάς τις άλλες[0]:

 L> #!/usr/bin/guile -s
 L> !#

 L> (define lt (make-vector 6))

 L> (let loop
 L>     ((i 0))
 L>   (if (< i 6)
 L>       (begin
 L>         (vector-set! lt i (read))
 L>         (loop (+ i 1)))))

 L> (let loop
 L>     ((i 0))
 L>   (if (< i 6)
 L>       (begin
 L>         (display i)
 L>         (write-char #\space)
 L>         (display (vector-ref lt i))
 L>         (newline)
 L>         (loop (+ i 1)))))

Ama einai na to pame etsi, ki egw 8a sou pw : Xrhsimopoieis Caml kai ola ta
alla einai aplws odontopastes : 

let readfile inch =
  let str = input_line inch in
  let strlist = split (regexp "[ \t]+") str in
  match strlist with
    l1  :: l2 :: l3 :: l4 :: [] -> {a1=l1;a2=l2;a3=l3;a4=l4;}
  | _ -> raise (Failure "Bad Input")

--
Christos Ricudis
Prof:    So the American government went to IBM to come up with a data
         encryption standard and they came up with ...
Student: EBCDIC!
--
====================================================================
Gia boithia (h na diagrafhte) e-mail sto majordomo at hellug.gr
Ta archives tis listas einai sto http://lists.hellug.gr/archives
prin steilete kapoia erothsh psakte mipos exei hdh apanththei.
Gia opoiodipote problima stilte e-mail ston owner-linux-greek-users at hellug.gr
====================================================================



More information about the Linux-greek-users mailing list