Commit eb012e7a authored by HEMERY Mathieu's avatar HEMERY Mathieu
Browse files

Rewrite print_show_option

parent ff0b45ba
......@@ -761,6 +761,8 @@ print_hybrid_species_constraint([Constraints|Tail], Counter, Stream) :-
print_hybrid_species_constraint(Tail, Counterp, Stream).
concat_species([], '').
concat_species([Sp|Sp_tail], Result) :-
species_to_total(Sp, Sp_tot),
foldl(concat_species_sr, Sp_tail, Sp_tot, Result).
......@@ -769,18 +771,10 @@ concat_species_sr(Sp, Acc, Accn) :-
species_to_total(Sp, Sp_tot),
atomic_list_concat([Acc, ', ', Sp_tot], Accn).
print_show_option(Hybrid_original_list,Stream) :-
(
Hybrid_original_list = []
->
write(Stream,'%option(show: {}).'),nl(Stream)
;
concat_species(Hybrid_original_list, SpeciesList),
write(Stream,'option(show: {'),
write(Stream,SpeciesList),
write(Stream,'}). % Choose here the species to plot'),
nl(Stream)
).
print_show_option(Hybrid_original_list, Stream) :-
concat_species(Hybrid_original_list, Sp_list),
format(Stream, 'option(show: {~w}). % Choose here the species to plot~n', Sp_list).
/************************/
......
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