Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/tcl8.5.2/doc/SetRecLmt.3 @ 25

Last change on this file since 25 was 25, checked in by landauf, 16 years ago

added tcl to libs

File size: 1.9 KB
Line 
1'\"
2'\" Copyright (c) 1989-1993 The Regents of the University of California.
3'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
4'\"
5'\" See the file "license.terms" for information on usage and redistribution
6'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
7'\"
8'\" RCS: @(#) $Id: SetRecLmt.3,v 1.3 1999/04/16 00:46:33 stanton Exp $
9'\"
10.so man.macros
11.TH Tcl_SetRecursionLimit 3 7.0 Tcl "Tcl Library Procedures"
12.BS
13.SH NAME
14Tcl_SetRecursionLimit \- set maximum allowable nesting depth in interpreter
15.SH SYNOPSIS
16.nf
17\fB#include <tcl.h>\fR
18.sp
19int
20\fBTcl_SetRecursionLimit\fR(\fIinterp, depth\fR)
21.SH ARGUMENTS
22.AS Tcl_Interp *interp
23.AP Tcl_Interp *interp in
24Interpreter whose recursion limit is to be set.
25Must be greater than zero.
26.AP int depth in
27New limit for nested calls to \fBTcl_Eval\fR for \fIinterp\fR.
28.BE
29
30.SH DESCRIPTION
31.PP
32At any given time Tcl enforces a limit on the number of recursive
33calls that may be active for \fBTcl_Eval\fR and related procedures
34such as \fBTcl_GlobalEval\fR.
35Any call to \fBTcl_Eval\fR that exceeds this depth is aborted with
36an error.
37By default the recursion limit is 1000.
38.PP
39\fBTcl_SetRecursionLimit\fR may be used to change the maximum
40allowable nesting depth for an interpreter.
41The \fIdepth\fR argument specifies a new limit for \fIinterp\fR,
42and \fBTcl_SetRecursionLimit\fR returns the old limit.
43To read out the old limit without modifying it, invoke
44\fBTcl_SetRecursionLimit\fR with \fIdepth\fR equal to 0.
45.PP
46The \fBTcl_SetRecursionLimit\fR only sets the size of the Tcl
47call stack:  it cannot by itself prevent stack overflows on the
48C stack being used by the application.  If your machine has a
49limit on the size of the C stack, you may get stack overflows
50before reaching the limit set by \fBTcl_SetRecursionLimit\fR.
51If this happens, see if there is a mechanism in your system for
52increasing the maximum size of the C stack.
53
54.SH KEYWORDS
55nesting depth, recursion
Note: See TracBrowser for help on using the repository browser.