LCStream の Copy メソッド

このメソッドは、LCStream オブジェクトの値を別のオブジェクトにコピーします。データは単に参照されるのではなく、実際にコピーされます。

定義位置

LCStream

構文

Set newStream = lcStream. Copy

パラメータ

パラメータ

説明

lcStream

LCStream。コピーするソースストリームです。

戻り値

説明

newStream

LCStream。元のストリームのコピーです。

Option Public
Uselsx "*lsxlc" 
Sub Initialize
  Dim msg As New LCStream
  Dim newmsg As LCstream
  msg.Text = "Peter Pan"
  Set newmsg = msg.Copy
  Print "The original msg is " & msg.Text
  msg.Text = "Tinkerbell"
  Print "The new msg is " & newmsg.Text
End Sub

出力例

The original msg is Peter Pan.
The new msg is Peter Pan.