PC SOFT

WINDEV的在线文档

  • Nesting
  • Special cases
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系:info@cn.windev.com
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

Factorizes the expression of an element on which several sub-elements or properties are accessed.
例子
WITHFile
.Item1
结束

WITHControl
..X=5
..Y=6
结束

WITHClassVariable
.Member5
结束

语法
 WITH <Expression representing a base element>
   .<Sub-element>
   ..<Property>
  :<Member or attribute>
END

<WITH>:
Marks the beginning of the statement block.
<Expression representing a base element>:
Element used. The following elements can be used:
  • the controls,
  • the HFSQL files,
  • the data sources,
  • the advanced types (Record, xml节点型, ...),
  • the structures,
  • the classes,
  • the .NET objects and the Windows Store app objects.
Caution: The expression representing the base element is evaluated once only.
<END>:
Marks the end of the statement block.

注意

Nesting

The WITH blocks can be nested. However, the element on which the accesses to the sub-elements, properties or members are performed is always the element of the most inside block.

oo谷歌日历型
sTitlesAuthorName字符串型
WITHoo
sTitle=..标题
WITH..作者
sAuthorName=..名称
结束
结束

Special cases

  • In a class method, you cannot access the members of the class with the <:Member> syntax inside a WITH block. The ':' operator is reserved to the element of the WITH block.
  • The debugger is used to view the sub-elements of the current WITH block.