点击或拖拽改变大小

MemVar 类

X#
Internal type that implements the Dynamic Memory Variables.
继承层次
Object
  MemVar

命名空间:  XSharp
程序集:  XSharp.RT (在 XSharp.RT.dll 中) 版本:2.22 GA
语法
 CLASS MemVar
查看代码

MemVar 类型公开以下成员。

构造函数
  名称说明
公共方法MemVar
初始化 MemVar 类的一个新实例
Top
属性
  名称说明
公共属性Name
Name of the memory variable.
公共属性Value
Value of the memory variable. The default is NIL for PRIVATEs and FALSE for PUBLICs.
Top
方法
  名称说明
公共方法静态成员_Get
Get the value of a local, private or public (in that order). Throws an exception when the variable does not exist.
公共方法静态成员_GetSafe
Get the value of a local, private or public (in that order). Returns NIL if the value does not exist.
公共方法静态成员_Put
Updates the value of a local, private or public (in that order). If the value does not exist than a new variable at the current level is created.
公共方法静态成员Add
Add a public memvar or a private memvar to the current level.
公共方法静态成员Clear
Clear a variable by name. Tries to clear a private first and when that is not found then a public
公共方法静态成员ClearAll
Clear all memvar name/value pairs. Does not remove locals. Does not remove privates stack levels.
公共方法静态成员GetHigherLevelPrivate
Get a memvar object from the stack (if it exists)
公共方法静态成员Initialize
公共方法静态成员PrivateFind
Find a private variable. Try on the current level on the stack first and when not found then walk the stack.
公共方法静态成员PrivatePut
Update a private variable. Does NOT add a new variable
公共方法静态成员PrivatesCount
Get the total number of unique private variable names.
公共方法静态成员PrivatesEnum
Get an enumerator for all the unique names of private variables
公共方法静态成员PrivatesFirst
Get the first unique private variable name.
公共方法静态成员PrivatesNext
Get the next unique private variable name.
公共方法静态成员PublicFind
Find a public variable
公共方法静态成员PublicPut
Update a public variable. Does NOT create a new public when there is no variable with that name.
公共方法静态成员PublicsCount
Gets the total number of public variables.
公共方法静态成员PublicsEnum
Get an enumerator for all the unique names of public variables
公共方法静态成员PublicsFirst
Gets the name of the first public variable.
公共方法静态成员PublicsNext
Gets the name of the next public variable.
公共方法静态成员Release
Release a private variable
公共方法静态成员ReleaseAll
Assign NIL to all visible private variables. Hidden privates are not affected.
公共方法静态成员ReleasePrivates
Release all privates at a certain level and higher
公共方法静态成员TryGet
Try to retrieve the value of a local, private or public (in that order).
Top
字段
  名称说明
公共字段静态成员Get
Get the value of a local, private or public (in that order). Throws an exception when the variable does not exist.
公共字段静态成员GetSafe
Get the value of a local, private or public (in that order). Returns NIL if the value does not exist.
公共字段静态成员Put
Updates the value of a local, private or public (in that order). If the value does not exist than a new variable at the current level is created.
Top
备注
提示 提示:
动态内存变量(PUBLIC、PRIVATE、PARAMETERS)仅在 X# 语言和运行时中用于兼容性。
在大多数情况下,类型可以和应该被替换为词法作用域变量,如 LOCAL 和 GLOBAL。
参见