summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2018-10-20 23:41:32 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2018-10-20 23:41:32 (GMT)
commit9b417d4592f2b4b1640d0877d27345928e4210a7 (patch)
tree37d34c074b5e3c6a324ee8bd65a96e16c4b42b08 /doc
parentcb061edef8250a8cd969eb0eb291f4c44d65d74e (diff)
downloadtcl-9b417d4592f2b4b1640d0877d27345928e4210a7.zip
tcl-9b417d4592f2b4b1640d0877d27345928e4210a7.tar.gz
tcl-9b417d4592f2b4b1640d0877d27345928e4210a7.tar.bz2
Rebase on 8.7
Diffstat (limited to 'doc')
-rw-r--r--doc/define.n17
1 files changed, 13 insertions, 4 deletions
diff --git a/doc/define.n b/doc/define.n
index 883d5fa..4e99b9a 100644
--- a/doc/define.n
+++ b/doc/define.n
@@ -140,7 +140,7 @@ where the current namespace is the instance namespace of the class object
itself. This is useful for setting up, e.g., class-scoped variables.
.VE TIP478
.TP
-\fBmethod\fI name argList bodyScript\fR
+\fBmethod\fI name \fR?\fIoption\fR? \fIargList bodyScript\fR
.
This creates or updates a method that is implemented as a procedure-like
script. The name of the method is \fIname\fR, the formal arguments to the
@@ -150,7 +150,11 @@ the body of the method is evaluated, the current namespace of the method will
be a namespace that is unique to the current object. The method will be
exported if \fIname\fR starts with a lower-case letter, and non-exported
otherwise; this behavior can be overridden via \fBexport\fR and
-\fBunexport\fR.
+\fBunexport\fR
+.VS TIP519
+or by specifying \fB\-export\fR or \fB\-unexport\fR in the optional parameter
+\fIoption\fR.
+.VE TIP519
.RS
.PP
.VS TIP500
@@ -321,7 +325,7 @@ below), this command creates private forwarded methods.
.VE TIP500
.RE
.TP
-\fBmethod\fI name argList bodyScript\fR
+\fBmethod\fI name \fR?\fIoption\fR? \fIargList bodyScript\fR
.
This creates, updates or deletes an object method. The name of the method is
\fIname\fR, the formal arguments to the method (defined using the same format
@@ -329,7 +333,12 @@ as for the Tcl \fBproc\fR command) will be \fIargList\fR, and the body of the
method will be \fIbodyScript\fR. When the body of the method is evaluated, the
current namespace of the method will be a namespace that is unique to the
object. The method will be exported if \fIname\fR starts with a lower-case
-letter, and non-exported otherwise.
+letter, and non-exported otherwise;
+.VS TIP519
+this can be overridden by specifying \fB\-export\fR or \fB\-unexport\fR in the
+optional parameter \fIoption\fR, or via the \fBexport\fR and \fBunexport\fR
+definitions.
+.VE TIP519
.RS
.PP
.VS TIP500