public TCL.CompletionCode cmdProc( Interp interp, TclObject[] argv ) { string dirName; if ( argv.Length > 2 ) { throw new TclNumArgsException( interp, 1, argv, "?dirName?" ); } if ( argv.Length == 1 ) { dirName = "~"; } else { dirName = argv[1].ToString(); } if ( ( JACL.PLATFORM == JACL.PLATFORM_WINDOWS ) && ( dirName.Length == 2 ) && ( dirName[1] == ':' ) ) { dirName = dirName + "/"; } // Set the interp's working dir. interp.setWorkingDir( dirName ); return TCL.CompletionCode.RETURN; }