首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > 在 ns2 中创建类和对象

在 ns2 中创建类和对象

  • 资源大小:6.98 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: tcl

资 源 简 介

定义两个对象类,"老师"和"学生",其中"学生"是"老师"的孩子类和成员函数调用"迎"每个类 OTcl 脚本。后的类定义,声明的每个对象实例,每个实例的"主体"变量设置为数学教师,为学生和"打招呼"的成员函数的每个对象实例的名字叫。类是创建一个对象类和 instproc 的关键字是定义对象类的成员函数。使用关键字指定的类继承的超类。在中定义的成员函数,$self 行为相同 c + + 中的"this"指针和 instvar 检查,是否下面的变量名称已宣布在其类中或在它的超类。最后,若要创建一个对象实例,用新的关键字。

文 件 列 表

tcl
Otcl coding to create classes and objects..txt
Tcl script to create fixed color wireless nodes.txt
Tcl script to create the dynamic color and initial location to nodes.txt
Tcl script to create the dynamic number of nodes and its initial location.txt
Tcl script to create the dynamic number of nodes.txt
VIP VIP
0.185661s