summaryrefslogtreecommitdiff
path: root/ipl/packs/skeem/skdebug.icn
blob: 5288ad69ead8f79f15888b8073f2c59376128b61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
############################################################################
#
#	Name:	skdebug.icn
#
#	Title:	Scheme in Icon
#
#	Author: Bob Alexander
#
#	Date:	February 19, 1995
#
#	Description: see skeem.icn
#
############################################################################

#
# skeem -- Scheme in Icon
#
# Debugging utility procedures (not needed for "production" version)
#

procedure ShowEnv(tag,env,showInitial)
   local frame,pair
   /env := CurrentEnv
   write("+++ Environment ",tag)
   every frame := LLPairs(env) do {
      if /showInitial & /LLRest(frame) then break
      write("  +++ Frame:")
      every pair := !sort(LLFirst(frame)) do {
	 write("    ",Print(pair[1]),"\t",Print(pair[2]))
	 }
      }
   return
end

procedure Show(x[])
   every write("+++ ",Print(!x))
   return
end