Delphi备忘录——基本语句
2020-02-16 04:50
399 查看
选择语句:
1.If…Then…Else选择语句:
If (表达式) Then
Begin
语句块;
End
Else If(表达式) Then
Begin
语句块;
End;
Else
Begin
语句块;
End;
2.Case…Of…Else多分支控制语句:
Case (表达式) Of
情况常量值1:语句;
情况常量值2:语句;
情况常量值3:语句;
……
情况常量值n:语句;
Else: 语句;
End;
循环语句
1. While…do循环
While (表达式) do
语句
End;
2. Repeat…until循环(类似c中的do…while)
Repeat
语句
Until(表达式);
3. For…to…do循环(自变量增)
For 变量初值 to 终值 step 步长 do
Begin
语句块;
End;
4. For...downto…do循环(自变量减)
For 变量初值 downto 终值 step 步长 do
Begin
语句块;
End;
转载于:https://www.cnblogs.com/bestlove/p/6607508.html
- 点赞
- 收藏
- 分享
- 文章举报
相关文章推荐
- 几个获取Windows系统信息的Delphi程序
- Delphi中Format与FormatDateTime函数详解
- 从Delphi开发环境的变迁说起
- Delphi多条件模糊查询的实现
- Delphi7 提示未注册解决解决办法,201-09-05日,亲测有效
- delphi7深入了解keybd_event
- Delphi7存取图像
- DELPHI中完成端口(IOCP)的简单分析(1)
- 使用Delphi编写棋牌类游戏 -- 基础篇(1)
- 使用Delphi编写棋牌类游戏 -- 基础篇(2)
- Delphi 2009 gif动画方法
- Delphi调用外部程序详解(转)
- Delphi 2010手动安装indy10.5.7
- delphi调用js脚本
- 让UltraEdit-32成为Delphi 7编译器的工具设置
- Delphi7 安装ICS,与简单使用
- Delphi 拦截滚轮事件不响应滚轮的上下滚动
- Delphi Live Bindings 初探
- 重装Delphi10.2的IDE必要设置
- Delphi7 GDI+学习