File: recurse2.bsh

package info (click to toggle)
bsh 1.0-beta-2
  • links: PTS
  • area: contrib
  • in suites: potato
  • size: 1,804 kB
  • ctags: 1,857
  • sloc: java: 14,653; makefile: 53; sh: 14
file content (20 lines) | stat: -rw-r--r-- 567 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/java bsh.Interpreter

source("TestHarness.bsh");

foo( arg ) {
	System.out.println("arg = "+this.namespace.getVariable("arg")+"in : "+this.namespace);
	System.out.println("arg = "+super.namespace.getVariable("arg")+"in : "+super.namespace);
	blah=System.currentTimeMillis();
	Thread.sleep(100);
	if ( arg < 5 ) {
		foo( arg+1);
	}
	System.out.println("after arg = "+this.namespace.getVariable("arg")+"in : "+this.namespace);
	System.out.println("after arg = "+super.namespace.getVariable("arg")+"in : "+super.namespace);
	//return arg;
}

foo(1);

complete();