请选择 进入手机版 | 继续访问电脑版
设为首页收藏本站

欣东微医疗技术论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 362|回复: 0

powerbuilder共享变量和实例变量的关系

[复制链接]

382

主题

453

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
37042
QQ
发表于 2017-3-17 11:32:44 | 显示全部楼层 |阅读模式
    一个类的所有实例都拥有一样名称的实例变量,但不同实例的实例变量相互独立,同一时间可能都不一样,只与对应实例当前的运行状态有关;而共享变量却是这个类所有实例共享的,在内存中永远只有一片内存,如果某个实例修改了这个共享变量,那其它实例读取时就是修改后的内容.
    shared variable
A variable that belongs to an object definition and exists across all instances of the object. Shared variables retain their value when an object is closed and opened again. Shared variables are always private. They are accessible only in scripts for the object and for controls associated with the object. Shared variables can belong to the Application object, a window, a user object, or a menu.
    instance variable  
A variable that belongs to an object and is associated with an instance of that object (you can think of it as a property of the object). Instance variables have access keywords that determine whether scripts of other objects can access them. Instance variables can belong to the application, a window, a user object, or a menu.        
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|eastwill.org  

GMT+8, 2017-5-30 11:28 , Processed in 0.018285 second(s), 9 queries , Apc On.

Powered by Eastwill! X3.2

© 2001-2013 Eastwill Inc.

快速回复 返回顶部 返回列表