Commit aec79a6c authored by SOLIMAN Sylvain's avatar SOLIMAN Sylvain
Browse files

fixing read/write of compound identifiers

parent de7724e6
......@@ -34,6 +34,7 @@ commands = [
"compile_from_expression",
"compile_from_pivp",
"compile_program",
"compile_program_file",
"compile_transfer_function",
"compile_wgpac",
"continue",
......
......@@ -49,7 +49,7 @@ test(
setup(set_some_conservations),
cleanup(clear_model),
true(Conservations ==
'[0] a-a+2*a\n[1] b-b+2*b\n[2] c-c+2*c\n')
'[0] \'a-a\'+2*a\n[1] \'b-b\'+2*b\n[2] \'c-c\'+2*c\n')
]
) :-
with_output_to(atom(Conservations), command(list_conservations)).
......
......@@ -278,7 +278,7 @@ print_influence(_Id, Item) :-
(
Item = (Force for BasicInfluence)
->
format('~w for ', [Force])
format('~p for ', [Force])
;
BasicInfluence = Item
),
......@@ -294,15 +294,15 @@ print_influence(_Id, Item) :-
(
Inputs = (PositiveInputs / NegativeInputs)
->
format('~w / ~w', [PositiveInputs, NegativeInputs])
format('~p / ~p', [PositiveInputs, NegativeInputs])
;
Inputs = (/ NegativeInputs)
->
format('/ ~w', [NegativeInputs])
format('/ ~p', [NegativeInputs])
;
write(Inputs)
),
format(' ~w ~w', [Arrow, Output]).
format(' ~w ~p', [Arrow, Output]).
substract_list([], Difference, Difference).
......
......@@ -498,10 +498,18 @@ print_item(Id) :-
->
G
;
write(Item)
print(Item)
).
% make it so that print/1 does not quote things that look like a variable
user:portray(Thing) :-
with_output_to(atom(Atom), write(Thing)),
read_term_from_atom(Atom, Term, []),
var(Term),
!,
write(Atom).
:- dynamic(deleting/1).
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment