Sha256: 78a3c3b8b0040664e4d60266392663935ba43cfb59d001cf111f1c25faa82474
Contents?: true
Size: 1.07 KB
Versions: 14
Compression:
Stored size: 1.07 KB
Contents
gcd.rb:4 def gcd(a, b) # # ******************************************************** # # This tests the 'linetrace' command. # # ******************************************************** # set basename on basename is on. # set linetrace on line tracing is on. # continue Tracing(1):gcd.rb:18 gcd(3,5) Tracing(1):gcd.rb:6 if a > b Tracing(1):gcd.rb:6 if a > b Tracing(1):gcd.rb:10 return nil if a <= 0 Tracing(1):gcd.rb:10 return nil if a <= 0 Tracing(1):gcd.rb:12 if a == 1 or b-a == 0 Tracing(1):gcd.rb:12 if a == 1 or b-a == 0 Tracing(1):gcd.rb:15 return gcd(b-a, a) Tracing(1):gcd.rb:6 if a > b Tracing(1):gcd.rb:6 if a > b Tracing(1):gcd.rb:10 return nil if a <= 0 Tracing(1):gcd.rb:10 return nil if a <= 0 Tracing(1):gcd.rb:12 if a == 1 or b-a == 0 Tracing(1):gcd.rb:12 if a == 1 or b-a == 0 Tracing(1):gcd.rb:15 return gcd(b-a, a) Tracing(1):gcd.rb:6 if a > b Tracing(1):gcd.rb:6 if a > b Tracing(1):gcd.rb:10 return nil if a <= 0 Tracing(1):gcd.rb:10 return nil if a <= 0 Tracing(1):gcd.rb:12 if a == 1 or b-a == 0 Tracing(1):gcd.rb:12 if a == 1 or b-a == 0 Tracing(1):gcd.rb:13 return a
Version data entries
14 entries across 14 versions & 4 rubygems