diffs.txt --  DIFFERENCES BETWEEN TCL and JACL

RCS: @(#) $Id: diffs.txt,v 1.1.1.1 1998/10/14 21:09:07 cvsadmin Exp $

This file contains a list of differences between Tcl 8.x and Jacl 1.0.

What Works

These features work as do those in Tcl. Please notify us if you find
any behavior that deviates from that of native Tcl.

- All Tcl control flow constructs are fully implemented:

	break, bgerror, case, catch, continue, exit,
	for, foreach, if, proc, return, while
	switch:	-regexp option only works in binary release

- General Tcl commands that are completely implemented in Jacl.

	after, append, auto_load, cd, concat, eval, expr, format,
	global, incr, join, lappend, lindex, linsert list, llength,
	lrange, lreplace, lsort, package, pwd, rename, scan, seek,
	set, source, split, string, subst, tell, time, trace, unknown,
	unset, update, uplevel, upvar, vwait
	
	lsearch: -regexp option only works in binary release
	regexp:	 only works in binary release
	regsub:	 only works in binary release

----------

What Partially Works

These commands are close to being complete.  Please notify us if you
find errors other than those we have described.

- Currently, all I/O commands only handle synchronous I/O.  The
  following IO commands work but are limited to what Java allows. 

	close, eof, file, flush, gets, open, puts
	read, seek, tell, write
	glob:	-buggy on windows

- Regular experessions are only handled in Jacl's binary release.  Tcl
  commands regexp and regsub and lsearch and switch with -regexp flag
  are only fully functional in the binary release of Jacl.  We expect
  there will be different behavior in Jacl's handling of regexps.  The
  package we have included was designed to be compatible with perl5.
  One difference we know of is that the '^' character means "a new
  line begins with" in perl5, but in native Tcl, the '^' denotes
  "strictly begins with".  For those who want to include the regexp
  package in the Jacl source release, the download page is

	http://www.oroinc.com/downloads/index.html#OROMatcher

- Environment variable array "env" doesn't have the same indices
  defined in Jacl as in native Tcl.  USER and HOME are the only
  indices that are defined in both implementations.  Jacl defines
  non-native indices, such as CLASSPATH.

- Tcl commands that are not fully functional

	info:	Missing "loaded" option
	exec:	Only works on unix, but pipes and redirections don't work

----------

What Does Not Work

- Tcl commands that are not yet implemented in Jacl

	auto_execok, auto_mkindex, auto_reset
	binary, clock, fblocked, fcopy, fconfigure, fileevent
	history, interp, load, namespace, pkg_mkIndex, pid
	socket

----------

Jacl library classes and methods:

Java Class/Interface	Constructor/Method	Equivalent C Function

AssocData		disposeAssocData	Tcl_CmdDeleteProc

Command			cmdProc			Tcl_CommandProc

CommandWithDispose	disposeCmd		Tcl_CmdDeleteProc

EventDeleter		deleteEvent		Tcl_EventDeleteProc

Extension		init
			safeInit
			loadOnDemand		

IdleHandler		IdleHandler		Tcl_CreateIdleHandler
			cancel
			processIdleEvent

InternalRep		dispose			Tcl_ObjType.freeProc
			duplicate		Tcl_ObjType.dupIntRepProc
			toString		Tcl_ObjType.updateStringProc

Interp			Interp			Tcl_CreateInterp
			dispose			Tcl_DeleteInterp
			setVar			Tcl_SetVar, Tcl_SetVar2
			getVar			Tcl_GetVar, Tcl_GetVar2
			unsetVar		Tcl_UnsetVar, Tcl_UnsetVar2
			traceVar		Tcl_TraceVar, Tcl_TraceVar2
			untraceVar		Tcl_UntraceVar, Tcl_UntraceVar2
			createCommand		Tcl_CreateCommand
			deleteCommand		Tcl_DeleteCommand
			getCommand		Tcl_GetCommandInfo
			eval			Tcl_Eval, Tcl_EvalObj
						Tcl_GlobalEval
			evalFile		Tcl_EvalFile
			commandComplete		Tcl_CommandComplete
			setResult		Tcl_SetObjResult
						Tcl_SetResult
			getResult		Tcl_GetObjResult
			resetResult		Tcl_ResetResult
			backgroundError		Tcl_BackgroundError
			addErrorInfo		Tcl_AddErrorInfo
			setErrorCode		Tcl_SetObjErrorCode
			getNotifier		
			setAssocData		Tcl_SetAssocData
			getAssocData		Tcl_GetAssocData
			deleteAssocData		Tcl_DeleteAssocData
			pkgRequire		Tcl_PkgRequire
			pkgProvide		Tcl_PkgProvide

Notifier		deleteEvents		Tcl_DeleteEvents
			doOneEvent		Tcl_DoOneEvent
			getNotifierForThread
			preserve
			queueEvent		Tcl_QueueEvent
			release

ReflectObject		newInstance
			get

TclBoolean		newInstance		Tcl_NewBooleanObj
			get			Tcl_GetBooleanFromObj

TclDouble		newInstance		Tcl_NewDoubleObj
			get			Tcl_GetDoubleFromObj
			set			Tcl_SetDoubleObj

TclEvent		processEvent		Tcl_EventProc
			sync			Tcl_ServiceAll

TclException		TclException		

TclIndex		get			Tcl_GetIndexFromObj

TclInteger		newInstance		Tcl_NewIntObj
			get			Tcl_GetIntFromObj
			getForIndex		TclGetIntForIndex
			set			Tcl_SetIntObj

TclList			newInstance		Tcl_NewListObj
			append			Tcl_ListObjAppendList
			getLength		Tcl_ListObjLength
			getElements		Tcl_ListObjGetElements
			index			Tcl_ListObjIndex
			replace			Tcl_ListObjReplace

TclNumArgsException	TclNumArgsException	

TclObject		TclObject		Tcl_NewObj
			setInternalRep		Tcl_ConvertToType
			getInternalRep		TclObj.typePtr
			toString		Tcl_GetStringFromObj
			invalidateStringRep	Tcl_InvalidateStringRep
			preserve		Tcl_IncrRefCount
			release			Tcl_DecrRefCount
			isShared		Tcl_IsShared
			takeExclusive		

TclString		newInstance		Tcl_NewStringObj
			append			Tcl_AppendToObj

TimerHandler		Timerhandler		Tcl_CreateTimerHandler
			cancel
			processTimerEvent

Util			stringMatch		Tcl_StringMatch

VarTrace		traceProc		Tcl_TraceProc
