if then else 的特殊简写方法
来源:互联网 发布:实力声优 知乎 编辑:程序博客网 时间:2024/05/17 01:43
我们经常遇到类似:
var
a,b:Integer
begin
if (条件) then
Result := a
else
Result := b;
nd;
可以简写为
Result := iif(条件,a,b);
iif 在单元IdGlobal中,支持多种数据类型
--------------------------------------------------------------------------------------------------------
另外: strUtils.ifThen; Math.ifThen 两个函数可以实现 string和integer类型的iif.
--------------------------------------------------------------------------------------------------------
- if then else 的特殊简写方法
- Traits: 类型的else-if-then机制
- Traits技术:类型的if-else-then
- bash if... then....else
- PLSQL: IF-THEN-ELSE
- If...Then...Else
- if-then和if-then-else语句
- 条件编译 #If...Then...#Else
- IDCAMS IF-THEN-ELSE statement
- 3.8 If-then-else表达式
- Traits技术:类型的if-else-then(STL核心技术之一)
- asp中VBScript下 if then else的用法注意
- Traits技术:类型的if-else-then(STL核心技术之一)
- Callback function与if-then-else
- shell 脚本 if then else fi
- sql中IF ELSE THEN语法
- decode 函数之if-then-else逻辑
- PLSQL:if then else语句段
- Spring 2.0+ JRuby 快速入门四(Spring对动态语言的支持)
- Spring 2.0+ JRuby 快速入门五(其它支持功能)
- libusb 介绍
- 曾經的曾經已經曾經 ,未來的未來還在未來
- Linux下共享库的制作与使用
- if then else 的特殊简写方法
- WinSock主要扩充说明
- 利用IAR调试Mini2440
- 无题
- 超越Scrum:给游戏开发者的精益和看板
- 伤痛过后是什么?
- 基于cmpp协议的超长短信格式
- cmpp发送超长短信息
- c#中Split等分割字符串的几种方法(转)