oop:aboutclass
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
oop:aboutclass [2023/01/14 05:19] – [説明] machiaworx | oop:aboutclass [2023/01/14 05:48] (現在) – [サンプル] machiaworx | ||
---|---|---|---|
行 29: | 行 29: | ||
* 各種変数・関数の呼び出し方が「class.変数」「class.関数」となっていること | * 各種変数・関数の呼び出し方が「class.変数」「class.関数」となっていること | ||
- | * 「< | + | * 「< |
< | < | ||
行 39: | 行 39: | ||
==== サンプル ==== | ==== サンプル ==== | ||
- | shape={" | + | shape={" |
- | square = new shape | + | square = new shape // |
- | square.sides=3 | + | square.sides=3 |
- | square | + | square |
- | x=new square | + | square.__isa |
- | print x.sides | + | x=new square |
- | shape.puresq=function | + | print x.sides |
- | return self.sides*self.sides | + | shape.puresq=function |
+ | return self.sides*self.sides | ||
end function | end function | ||
- | print x.puresq() | + | print x.puresq() |
- | square | + | square |
- | square.__isa | + | square.__isa |
- | ==== サンプル説明 | + | ==== サンプル出力 |
{{: | {{: | ||
- | |||
oop/aboutclass.1673641168.txt.gz · 最終更新: 2023/01/14 05:19 by machiaworx