adamcrussell
Prolog. Developed and tested with GNU Prolog 1.5.0.:- dynamic(shape/2). read_line_codes(Stream, Codes):- get_code(Stream, C), ( C == -1 -> Codes = end_of_file ; C == 10 ->Codes = [] ; read_line_codes(Stream, Cs), Codes = [C|Cs] ). read_all_lines(Stream,...
adamcrussell
Prolog. Developed and tested with GNU Prolog 1.5.0.:-dynamic([connected/2, memoized_paths/3]). check_and_read(10, [] ,_):- !. check_and_read(Char, [Char|Chars], Stream):- get_code(Stream, NextChar), check_and_read(NextChar, Chars, Stream). read_data(Stream, []):-...
adamcrussell
Prolog. Developed and tested with GNU Prolog 1.5.0.check_and_read(10, [] ,_):- !. check_and_read(end_of_file, [], _):- !. check_and_read(Char, [Char|Chars], Stream):- get_code(Stream, NextChar), check_and_read(NextChar, Chars, Stream). read_data(Stream, []):-...
adamcrussell
Prolog. Developed and tested with GNU Prolog 1.5.0 and SWI-Prolog 9.2.9.:-dynamic(connected/2). check_and_read(10, [] ,_):- !. check_and_read(end_of_file, [], _):- !. check_and_read(Char, [Char|Chars], Stream):- get_code(Stream, NextChar), check_and_read(NextChar, Chars, Stream)....
adamcrussell
Prolog. Developed and tested with GNU Prolog 1.5.0.check_and_read(10, [] ,_):- !. check_and_read(end_of_file, [], _):- !. check_and_read(Char, [Char|Chars], Stream):- get_code(Stream, NextChar), check_and_read(NextChar, Chars, Stream). read_data(Stream, []):-...
adamcrussell
Prolog. Developed and tested with SWI-Prolog 9.2.9.check_and_read(10, [] ,_):- !. check_and_read(end_of_file, [], _):- !. check_and_read(Char, [Char|Chars], Stream):- get_code(Stream, NextChar), check_and_read(NextChar, Chars, Stream). read_data(Stream, []):-...
adamcrussell
Prolog. Developed and tested with GNU Prolog 1.5.0.check_and_read(10, [] ,_):- !. check_and_read(end_of_file, [], _):- !. check_and_read(Char, [Char|Chars], Stream):- get_code(Stream, NextChar), check_and_read(NextChar, Chars, Stream). read_data(Stream, []):-...
adamcrussell
Prolog. Developed and tested with GNU Prolog 1.5.0.check_and_read(10, [] ,_):- !. check_and_read(44, [] ,_):- !. check_and_read(end_of_file, [], _):- !. check_and_read(Char, [Char|Chars], Stream):- get_code(Stream, NextChar), check_and_read(NextChar, Chars, Stream)....
adamcrussell
Prolog. Developed and tested with GNU Prolog 1.5.0.check_and_read(10, [] ,_):- !. check_and_read(end_of_file, [], _):- !. check_and_read(Char, [Char|Chars], Stream):- get_code(Stream, NextChar), check_and_read(NextChar, Chars, Stream). read_data(Stream, []):-...
adamcrussell
See http://www.rabbitfarm.com/cgi-bin/blosxom/prolog/2025/06/29\documentclass{article} \usepackage{color} \definecolor{linkcolor}{rgb}{0, 0, 0.7} \usepackage{amsmath} \usepackage[backref, raiselinks, pdfhighlight=/O, pagebackref, hyperfigures, breaklinks, colorlinks, pdfpagemode=UseNone,...