Over 10 Million Study Resources Now at Your Fingertips


Download as :
Rating : ⭐⭐⭐⭐⭐
Price : $10.99
Language:EN
Pages: 2

Errorline tcl eval returns tcl error

INTERFACING TCL WITH C 239

can’t handle partial statements; for instance, you can’t enter proc foo { } { on one line and expect to continue it on the next. You can exit with an end-of-file

Structure
Purpose
Members
Function

Tcl CreateInterp()

Synopsis

Allocates a new Tcl Interp structure and prepares it to re-ceive a script.

Returns
Function
Synopsis

interp — Pointer to the Tcl Interp to delete.

Function

Tcl Eval(interp, script)

Synopsis
Returns
Params
240

CHAPTER 6. GAME SCRIPTING UNDER LINUX

Function

Tcl EvalFile(interp, filename)

Synopsis
Returns
Params

Tcl represents data as objects (of type Tcl Obj). This abstract structure allows Tcl to deal with strings, integers, and floating point numbers without having to covert between types more than necessary. Tcl Obj is an abstract datatype, and you should avoid touching it directly. Tcl supplies functions for creating and accessing Tcl Obj variables as strings, integers, and doubles. The library can convert Tcl Obj objects between variable types whenever it needs to; for
instance, if you create a variable as an integer an then try to access it as a string, Tcl will perform this conversion behind the scenes. There is no real limit to the number of variables you can create, but you should probably think twice about creating more than a few hundred (it’s rarely necessary and performance could suffer).

codeTcl CreateObjCommand creates a new command and adds it to a given interpreter2. It takes a pointer to a Tcl Interp, a command name, a pointer to a handler function, an optional piece of “client data” (an integer), and a pointer to a cleanup function. Whenever the new command is called from within Tcl, the interpreter will give control to the handler function and await a result. It also passes the particular command’s client data to the handler; this serves no defined purpose, so you can use it for just about anything. One possible use would be to allow several commands to use one big handler function. The cleanup function is optional. Tcl will call it when it’s time to delete a command from the
interpreter, but this is only useful in a few cases. We’ll generally set this to NULL.

How It Works
Login account
Login Your Account
Add to cart
Add to Cart
Payment
Make payment
Document download
Download File
PageId: ELI0564E1B
img
Uploaded by :
QJnDQ0BX
Page 1 Preview
errorline tcl eval returns tcl error
Sell Your Old Documents & Earn Wallet Balance