wasCSharpSQLite – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 /*
2 * ExitCmd.java
3 *
4 * Copyright (c) 1997 Cornell University.
5 * Copyright (c) 1997 Sun Microsystems, Inc.
6 *
7 * See the file "license.terms" for information on usage and
8 * redistribution of this file, and for a DISCLAIMER OF ALL
9 * WARRANTIES.
10 *
11 * Included in SQLite3 port to C# for use in testharness only; 2008 Noah B Hart
12 *
13 * RCS @(#) $Id: ExitCmd.java,v 1.1.1.1 1998/10/14 21:09:19 cvsadmin Exp $
14 *
15 */
16 using System;
17 namespace tcl.lang
18 {
19  
20 /// <summary> This class implements the built-in "exit" command in Tcl.</summary>
21 class ExitCmd : Command
22 {
23  
24 /// <summary> See Tcl user documentation for details.</summary>
25 public TCL.CompletionCode cmdProc( Interp interp, TclObject[] argv )
26 {
27 int code;
28  
29 if ( argv.Length > 2 )
30 {
31 throw new TclNumArgsException( interp, 1, argv, "?returnCode?" );
32 }
33 if ( argv.Length == 2 )
34 {
35 code = TclInteger.get( interp, argv[1] );
36 }
37 else
38 {
39 code = 0;
40 }
41 return TCL.CompletionCode.EXIT;
42 }
43 }
44 }