このディレクトリの索引

popen(Command,Chars) :-
        open(pipe(Command),read,Instream),
        get_char(Instream,Char),
        popen(Instream,Char,Chars),
        close(Instream),!.

popen(Instream,end_of_file,[]) :- !.
popen(Instream,Char,[Char|R]) :-
        get_char(Instream,Char2),
        popen(Instream,Char2,R).