OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tcl/] [doc/] [source.n] - Blame information for rev 578

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
'\"
2
'\" Copyright (c) 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: source.n,v 1.1.1.1 2002-01-16 10:25:25 markom Exp $
9
'\"
10
.so man.macros
11
.TH source n "" Tcl "Tcl Built-In Commands"
12
.BS
13
'\" Note:  do not modify the .SH NAME line immediately below!
14
.SH NAME
15
source \- Evaluate a file or resource as a Tcl script
16
.SH SYNOPSIS
17
\fBsource \fIfileName\fR
18
.sp
19
\fBsource\fR \fB\-rsrc \fIresourceName \fR?\fIfileName\fR?
20
.sp
21
\fBsource\fR \fB\-rsrcid \fIresourceId \fR?\fIfileName\fR?
22
.BE
23
 
24
.SH DESCRIPTION
25
.PP
26
This command takes the contents of the specified file or resource
27
and passes it to the Tcl interpreter as a text script.  The return
28
value from \fBsource\fR is the return value of the last command
29
executed in the script.  If an error occurs in evaluating the contents
30
of the script then the \fBsource\fR command will return that error.
31
If a \fBreturn\fR command is invoked from within the script then the
32
remainder of the file will be skipped and the \fBsource\fR command
33
will return normally with the result from the \fBreturn\fR command.
34
 
35
The \fI\-rsrc\fR and \fI\-rsrcid\fR forms of this command are only
36
available on Macintosh computers.  These versions of the command
37
allow you to source a script from a \fBTEXT\fR resource.  You may specify
38
what \fBTEXT\fR resource to source by either name or id.  By default Tcl
39
searches all open resource files, which include the current
40
application and any loaded C extensions.  Alternatively, you may
41
specify the \fIfileName\fR where the \fBTEXT\fR resource can be found.
42
 
43
.SH KEYWORDS
44
file, script

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.