wasCSharpSQLite – Blame information for rev
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | /* |
2 | * ExprValue.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: ExprValue.java,v 1.2 1999/05/09 00:03:00 dejong Exp $ |
||
14 | * |
||
15 | */ |
||
16 | using System; |
||
17 | namespace tcl.lang |
||
18 | { |
||
19 | |||
20 | /// <summary> Describes an expression value, which can be either an integer (the |
||
21 | /// usual case), a double-precision floating-point value, or a string. |
||
22 | /// A given number has only one value at a time. |
||
23 | /// </summary> |
||
24 | |||
25 | class ExprValue |
||
26 | { |
||
27 | internal const int ERROR = 0; |
||
28 | internal const int INT = 1; |
||
29 | internal const int DOUBLE = 2; |
||
30 | internal const int STRING = 3; |
||
31 | |||
32 | /// <summary> Integer value, if any.</summary> |
||
33 | internal long intValue; |
||
34 | |||
35 | /// <summary> Floating-point value, if any.</summary> |
||
36 | internal double doubleValue; |
||
37 | |||
38 | /// <summary> Used to hold a string value, if any.</summary> |
||
39 | internal string stringValue; |
||
40 | |||
41 | /// <summary> Type of value: INT, DOUBLE, or STRING.</summary> |
||
42 | internal int type; |
||
43 | |||
44 | /// <summary> Constructors.</summary> |
||
45 | internal ExprValue() |
||
46 | { |
||
47 | type = ERROR; |
||
48 | } |
||
49 | |||
50 | internal ExprValue( long i ) |
||
51 | { |
||
52 | intValue = i; |
||
53 | type = INT; |
||
54 | } |
||
55 | |||
56 | internal ExprValue( double d ) |
||
57 | { |
||
58 | doubleValue = d; |
||
59 | type = DOUBLE; |
||
60 | } |
||
61 | |||
62 | internal ExprValue( string s ) |
||
63 | { |
||
64 | stringValue = s; |
||
65 | type = STRING; |
||
66 | } |
||
67 | } |
||
68 | } |