编程
Fundamentals
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes

Do-While语句

除了条件检查顺序不同外,这种循环与while循环相同。在这种循环方式内,条件的检查步骤放在每个迭代的最后。

语法

源代码 (UnigineScript)
do { 
	// some_code;
 } while(condition);

Parts

  • some_code 为执行的代码。

示例

源代码 (UnigineScript)
int i = 10;
do {
	log.message("%d ",i);
	i++;
} while(i < 10);
// 结果为: 10
最新更新: 2017-07-03