diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2008-10-17 10:22:24 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2008-10-17 10:22:24 (GMT) |
commit | 842e3ff91428c72a2ce0d4df4889778af82f4b12 (patch) | |
tree | 5a94240e321022019f593f6bd712833ab12138c6 /doc/copy.n | |
parent | 8b464633a0f2df93912ad25af65a5724cd643da2 (diff) | |
download | tcl-842e3ff91428c72a2ce0d4df4889778af82f4b12.zip tcl-842e3ff91428c72a2ce0d4df4889778af82f4b12.tar.gz tcl-842e3ff91428c72a2ce0d4df4889778af82f4b12.tar.bz2 |
Improve clarity of formatting.
Diffstat (limited to 'doc/copy.n')
-rw-r--r-- | doc/copy.n | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: copy.n,v 1.1 2008/05/31 11:42:12 dkf Exp $ +'\" RCS: @(#) $Id: copy.n,v 1.2 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH copy n 0.1 TclOO "TclOO Commands" @@ -19,8 +19,8 @@ package require TclOO \fBoo::copy\fI sourceObject \fR?\fItargetObject\fR? .fi .BE - .SH DESCRIPTION +.PP The \fBoo::copy\fR command creates a copy of an object or class. It takes the name of the object or class to be copied, \fIsourceObject\fR, and optionally the name of the object or class to create, \fItargetObject\fR, which will be @@ -33,8 +33,10 @@ contents of the source object's private namespace \fIwill not\fR be copied; it is up to the caller to do this. The result of this command will be the fully-qualified name of the new object or class. .SH EXAMPLES +.PP This example creates an object, copies it, modifies the source object, and then demonstrates that the copied object is indeed a copy. +.PP .CS oo::object create src oo::define src method msg {} {puts foo} @@ -47,7 +49,6 @@ dst msg \fI\(-> prints "foo"\fR oo::class(n), oo::define(n), oo::object(n) .SH KEYWORDS clone, copy, duplication, object - .\" Local variables: .\" mode: nroff .\" fill-column: 78 |