presenter::mkExpand
Posted: 26 Jun 2019 0:25
Hello Thomas,
when setting a breakpoint in below code at the indicated line and running it in the debugger (in build 902), a line for variable Num is displayed in the "Variables in the Current Clause" window. However (with "Native View" not checked on) the line cannot be expanded by mouse click. I suppose that is not intended?
when setting a breakpoint in below code at the indicated line and running it in the debugger (in build 902), a line for variable Num is displayed in the "Variables in the Current Clause" window. However (with "Native View" not checked on) the line cannot be expanded by mouse click. I suppose that is not intended?
Code: Select all
domains
num = unsigned [presenter(present_num)].
class predicates
getNumName : (num) -> string.
clauses
getNumName(0) = "zero" :-
!.
getNumName(1) = "one" :-
!.
getNumName(_) = "many".
class predicates
present_num : presenter::presenter{num}.
clauses
present_num(Num) = present_num(Num, Num).
class predicates
present_num : (num Num, unsigned NumUnsigned) -> presenter::presentation.
clauses
present_num(Num, NumUnsigned) = presenter::mkExpand(Name, NumUnsigned) :-
Name = getNumName(Num).
class predicates
test : (num).
clauses
test(Num) :-
stdIO::write(Num). %set a breakpoint here
clauses
run() :-
test(1).