source: trunk/j/src/bsh/commands/print.bsh @ 2

Last change on this file since 2 was 2, checked in by piso, 18 years ago

Initial checkin.

File size: 348 bytes
Line 
1
2bsh.help.print = "usage: print( value )";
3
4print( arg ) {
5  if ( arg == null )
6    arg = "null";
7
8  if ( arg instanceof Object [] ) {
9    len = arg.length;
10    print( "Array: "+arg +" {");
11    for( int i=0; i< len; i++ ) {
12      this.interpreter.print("   ");
13      print( arg[i] );
14    }
15    print ( "}");
16  } else
17    this.interpreter.println(String.valueOf(arg));
18}
19
Note: See TracBrowser for help on using the repository browser.