|
630 | 630 | %pc_portray(X):- is_list(X),print_tree_unit(X).
|
631 | 631 |
|
632 | 632 | pc_portray(Term):- var(Term),!,fail.
|
| 633 | +pc_portray(_):- \+ nb_current(pc_portray,true), \+ current_prolog_flag(pc_portray,true), !, fail. |
633 | 634 | pc_portray(Term):- atom(Term), exists_file_safe(Term),public_file_link(Term,Public),write_q(Public).
|
634 | 635 | pc_portray(Term:L):- integer(L),atom(Term), exists_file_safe(Term),public_file_link(Term:L,Public),write_q(Public).
|
635 | 636 | pc_portray(mfl4(M,F,Term,L)):- integer(L),atom(Term), exists_file_safe(Term),public_file_link(Term:L,Public),write_q(mfl4(M,F,Public,L)).
|
|
901 | 902 | /*
|
902 | 903 |
|
903 | 904 | _________________________________________________________________________
|
904 |
| -| Copyright (C) 1982 | |
905 |
| -| | |
906 |
| -| David Warren, | |
907 |
| -| SRI International, 333 Ravenswood Ave., Menlo Park, | |
908 |
| -| California 94025, USA; | |
909 |
| -| | |
910 |
| -| Fernando Pereira, | |
911 |
| -| Dept. of Architecture, University of Edinburgh, | |
912 |
| -| 20 Chambers St., Edinburgh EH1 1JZ, Scotland | |
913 |
| -| | |
914 |
| -| This program may be used, copied, altered or included in other | |
915 |
| -| programs only for academic purposes and provided that the | |
916 |
| -| authorship of the initial program is aknowledged. | |
917 |
| -| Use for commercial purposes without the previous written | |
918 |
| -| agreement of the authors is forbidden. | |
| 905 | +| Copyright (C) 1982 | |
| 906 | +| | |
| 907 | +| David Warren, | |
| 908 | +| SRI International, 333 Ravenswood Ave., Menlo Park, | |
| 909 | +| California 94025, USA; | |
| 910 | +| | |
| 911 | +| Fernando Pereira, | |
| 912 | +| Dept. of Architecture, University of Edinburgh, | |
| 913 | +| 20 Chambers St., Edinburgh EH1 1JZ, Scotland | |
| 914 | +| | |
| 915 | +| This program may be used, copied, altered or included in other | |
| 916 | +| programs only for academic purposes and provided that the | |
| 917 | +| authorship of the initial program is aknowledged. | |
| 918 | +| Use for commercial purposes without the previous written | |
| 919 | +| agreement of the authors is forbidden. | |
919 | 920 | |_________________________________________________________________________|
|
920 | 921 |
|
921 | 922 | */
|
|
2023 | 2024 | ( (wots(S,write_q([A|R])),atom_concat_safety('[',MR,S),atom_concat_safety(M,']',MR), write(M))->true
|
2024 | 2025 | ; (write_simple(A), write_simple_each(Sep,R))).
|
2025 | 2026 |
|
2026 |
| -%% between_down(+Start, ?Count, +End) is nondet. |
| 2027 | +%% between_down(+Start, ?Count, +End) is nondet. |
2027 | 2028 | %
|
2028 |
| -% Similar to between/3, but can count down if Start > End. |
| 2029 | +% Similar to between/3, but can count down if Start > End. |
2029 | 2030 |
|
2030 | 2031 | between_down(Start, End, Count) :-
|
2031 |
| - Start =< End, !, |
2032 |
| - between(Start, End, Count). |
| 2032 | + Start =< End, !, |
| 2033 | + between(Start, End, Count). |
2033 | 2034 | between_down(Start, End, Count) :-
|
2034 |
| - nonvar(Count), !, |
2035 |
| - between(End, Start, Count). |
| 2035 | + nonvar(Count), !, |
| 2036 | + between(End, Start, Count). |
2036 | 2037 | between_down(Start, End, Count) :-
|
2037 |
| - Range is Start-End, |
2038 |
| - between(0, Range, X), |
2039 |
| - Count is Start-X. |
| 2038 | + Range is Start-End, |
| 2039 | + between(0, Range, X), |
| 2040 | + Count is Start-X. |
2040 | 2041 |
|
2041 | 2042 | rev_append(L,R,LR):- is_list(LR),!, reverse(LR,RL),append(L1,R1,RL),reverse(L1,R),reverse(R1,L).
|
2042 | 2043 | rev_append(L,R,LR):- append(LL,RR,LR), (var(RR);RR \= [_|_]), !, rev_append(L,R1,LL),append(R1,RR,R).
|
|
2776 | 2777 |
|
2777 | 2778 |
|
2778 | 2779 |
|
2779 |
| - /******************************* |
2780 |
| - * SHARED WITH term_html.pl * |
2781 |
| - *******************************/ |
| 2780 | + /******************************* |
| 2781 | + * SHARED WITH term_html.pl * |
| 2782 | + *******************************/ |
2782 | 2783 |
|
2783 | 2784 | %! term(@Term, +Options)// is det.
|
2784 | 2785 | %
|
|
0 commit comments