001: /*
002: * TCL.java --
003: *
004: * This class stores all the public constants for the tcl.lang.
005: * The exact values should match those in tcl.h.
006: *
007: * Copyright (c) 1997 Sun Microsystems, Inc.
008: *
009: * See the file "license.terms" for information on usage and
010: * redistribution of this file, and for a DISCLAIMER OF ALL
011: * WARRANTIES.
012: *
013: * RCS: @(#) $Id: TCL.java,v 1.6 2005/09/11 20:56:57 mdejong Exp $
014: *
015: */
016:
017: package tcl.lang;
018:
019: // This class holds all the publicly defined constants contained by the
020: // tcl.lang package.
021:
022: public class TCL {
023:
024: // Flag values passed to variable-related procedures. THESE VALUES
025: // MUST BE CONSISTANT WITH THE C IMPLEMENTATION OF TCL.
026:
027: public static final int GLOBAL_ONLY = 1;
028: public static final int NAMESPACE_ONLY = 2;
029: public static final int APPEND_VALUE = 4;
030: public static final int LIST_ELEMENT = 8;
031: public static final int TRACE_READS = 0x10;
032: public static final int TRACE_WRITES = 0x20;
033: public static final int TRACE_UNSETS = 0x40;
034: public static final int TRACE_DESTROYED = 0x80;
035: public static final int INTERP_DESTROYED = 0x100;
036: public static final int LEAVE_ERR_MSG = 0x200;
037: public static final int PARSE_PART1 = 0x400; // deprecated!
038: public static final int TRACE_ARRAY = 0x800;
039:
040: // When an TclException is thrown, its compCode may contain any
041: // of the following values:
042: //
043: // TCL.ERROR The command couldn't be completed successfully;
044: // the interpreter's result describes what went wrong.
045: // TCL.RETURN The command requests that the current procedure
046: // return; the interpreter's result contains the
047: // procedure's return value.
048: // TCL.BREAK The command requests that the innermost loop
049: // be exited; the interpreter's result is meaningless.
050: // TCL.CONTINUE Go on to the next iteration of the current loop;
051: // the interpreter's result is meaningless.
052:
053: public static final int ERROR = 1;
054: public static final int RETURN = 2;
055: public static final int BREAK = 3;
056: public static final int CONTINUE = 4;
057:
058: // TCL.OK is not typically used as an exception completion code. A
059: // TclException would not normally be invoked with the TCL.OK code,
060: // but there are some cases where this value could be used. For
061: // example, code that invoked Interp.updateReturnInfo() and
062: // invokes the Command.cmdProc() API directly without using
063: // Interp.eval().
064:
065: public static final int OK = 0;
066:
067: // The following value is used by the Interp::commandComplete(). It's used
068: // to report that a script is not complete.
069:
070: protected static final int INCOMPLETE = 10;
071:
072: // Flag values to pass to Tcl_DoOneEvent to disable searches
073: // for some kinds of events:
074:
075: public static final int DONT_WAIT = (1 << 1);
076: public static final int WINDOW_EVENTS = (1 << 2);
077: public static final int FILE_EVENTS = (1 << 3);
078: public static final int TIMER_EVENTS = (1 << 4);
079: public static final int IDLE_EVENTS = (1 << 5);
080: public static final int ALL_EVENTS = (~DONT_WAIT);
081:
082: // The largest positive and negative integer values that can be
083: // represented in Tcl.
084:
085: static final long INT_MAX = 2147483647;
086: static final long INT_MIN = -2147483648;
087:
088: // These values are used by Util.strtoul and Util.strtod to
089: // report conversion errors.
090:
091: static final int INVALID_INTEGER = -1;
092: static final int INTEGER_RANGE = -2;
093: static final int INVALID_DOUBLE = -3;
094: static final int DOUBLE_RANGE = -4;
095:
096: // Positions to pass to Tcl_QueueEvent. THESE VALUES
097: // MUST BE CONSISTANT WITH THE C IMPLEMENTATION OF TCL.
098:
099: public static final int QUEUE_TAIL = 0;
100: public static final int QUEUE_HEAD = 1;
101: public static final int QUEUE_MARK = 2;
102:
103: // Flags used to control the TclIndex.get method.
104:
105: public static final int EXACT = 1; // Matches must be exact.
106:
107: // Flag values passed to recordAndEval and/or evalObj.
108: // These values must match those defined in tcl.h !!!
109:
110: // Note: EVAL_DIRECT is not currently used in Jacl.
111:
112: public static final int NO_EVAL = 0x10000;
113: public static final int EVAL_GLOBAL = 0x20000;
114: public static final int EVAL_DIRECT = 0x40000;
115:
116: } // end TCL
|