wasCSharpSQLite – Blame information for rev
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | /* |
2 | * LlengthCmd.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: LlengthCmd.java,v 1.1.1.1 1998/10/14 21:09:21 cvsadmin Exp $ |
||
14 | * |
||
15 | */ |
||
16 | using System; |
||
17 | namespace tcl.lang |
||
18 | { |
||
19 | |||
20 | /// <summary> This class implements the built-in "llength" command in Tcl.</summary> |
||
21 | |||
22 | class LlengthCmd : Command |
||
23 | { |
||
24 | /// <summary> See Tcl user documentation for details.</summary> |
||
25 | /// <exception cref=""> TclException If incorrect number of arguments. |
||
26 | /// </exception> |
||
27 | |||
28 | public TCL.CompletionCode cmdProc( Interp interp, TclObject[] argv ) |
||
29 | { |
||
30 | if ( argv.Length != 2 ) |
||
31 | { |
||
32 | throw new TclNumArgsException( interp, 1, argv, "list" ); |
||
33 | } |
||
34 | interp.setResult( TclInteger.newInstance( TclList.getLength( interp, argv[1] ) ) ); |
||
35 | return TCL.CompletionCode.RETURN; |
||
36 | } |
||
37 | } |
||
38 | } |