beetlebug▾
/

interp exists

Tests if an interpreter exists.

interp exists ?PATH?

Description

Gives 1 when PATH names an interpreter, else 0. With no PATH, or with {}, the path is the current interpreter, which exists.

Arguments

ArgumentTypeDefaultDescription
PATHinterpreter path{}The path to test.

Returns

1 or 0.

Examples

% interp create box; interp exists box
1

% interp exists nope
0

% interp exists
1

Errors

% interp exists a b
wrong # args: should be "interp exists ?path?"
-errorcode TCL WRONGARGS

Facts

Capability
interp. A new interpreter does not have it until the host turns it on.
Tcl release
Tcl 9.1 and 8.6.
Since
ztcl 1.0.0-beta.1

See also