wasCSharpSQLite – Blame information for rev
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | /* |
2 | * ListCmd.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: ListCmd.java,v 1.1.1.1 1998/10/14 21:09:19 cvsadmin Exp $ |
||
14 | * |
||
15 | */ |
||
16 | using System; |
||
17 | using System.Text; |
||
18 | |||
19 | namespace tcl.lang |
||
20 | { |
||
21 | |||
22 | /// <summary> This class implements the built-in "list" command in Tcl.</summary> |
||
23 | class ListCmd : Command |
||
24 | { |
||
25 | |||
26 | /// <summary> See Tcl user documentation for details.</summary> |
||
27 | public TCL.CompletionCode cmdProc( Interp interp, TclObject[] argv ) |
||
28 | { |
||
29 | TclObject list = TclList.newInstance(); |
||
30 | |||
31 | list.preserve(); |
||
32 | try |
||
33 | { |
||
34 | for ( int i = 1; i < argv.Length; i++ ) |
||
35 | TclList.append( interp, list, argv[i] ); |
||
36 | interp.setResult( list ); |
||
37 | } |
||
38 | finally |
||
39 | { |
||
40 | list.release(); |
||
41 | } |
||
42 | return TCL.CompletionCode.RETURN; |
||
43 | } |
||
44 | } |
||
45 | } |