| %% la_strings.pl | |
| use_module(library(pio)). | |
| use_module(library(dcg/basics)). | |
| open_s(File,Mode,Stream) :- | |
| atom_string(File1,File), | |
| open(File1,Mode,Stream),!. | |
| string_atom(String,Atom) :- | |
| atom_string(Atom,String),!. | |
| phrase_from_file_s(string(Output), String) :- | |
| atom_string(String1,String), | |
| phrase_from_file(string(Output), String1),!. | |
| append_list2([],[]):-!. | |
| append_list2(A1,B):- | |
| A1=[A|List], | |
| append_list2(A,List,B),!. | |
| append_list2(A,[],A):-!. | |
| append_list2(A,List,B) :- | |
| List=[Item|Items], | |
| append(A,Item,C), | |
| append_list2(C,Items,B). | |
| writeln1(Term) :- | |
| term_to_atom(Term,Atom), | |
| writeln(Atom),!. | |