Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Map.del and trace problem?

11 views
Skip to first unread message

jf

unread,
Dec 15, 2024, 9:14:06 PM12/15/24
to Picat
Hi,
it seems Map.del() does not work in trace mode:

Picat> X=new_map(),X.put(a),X.put(b),X.del(a)
X = (map)[b]
yes

Picat> trace
Note: you need to recompile programs in debug mode for tracing

yes

{Trace mode}
Picat> X=new_map(),X.put(a),X.put(b),X.del(a)
   Call: (1) new_map ?
   Exit: (1) new_map = (map)[] ?
   Call: (2) _125c0 = (map)[] ?
   Exit: (2) (map)[] = (map)[] ?
   Call: (3) put((map)[],a) ?
   Exit: (3) put((map)[a],a) ?
   Call: (4) put((map)[a],b) ?
   Exit: (4) put((map)[b,a],b) ?
   Call: (5) del((map)[b,a],a) ?
*** Undefined procedure: del/2

{Trace mode}
Picat>

Picat> notrace

yes

Picat> X=new_map(),X.put(a),X.put(b),X.del(a)
X = (map)[b]
yes

Josef
Reply all
Reply to author
Forward
0 new messages