Progress的常用语句

Progress程序的分类:

.p 主程序(源程序)
.i 子程序(不能被单独执行,只能被.p程序引用)
.r 编译后的可执行程序

注释用/* */ 框起来,必须成对使用,否则报错。

[@more@]

定义一个变量:

define variable 变量名 as|like character|date|decimal|integer|logical.
例如: define variable a as character. /*定义了一个字符变量a*/
define variable b like pt_part. /*定义一个和pt_part一样的变量b*/

修改一个变量或者表字段(让用户输入新值):
update 变量名|字段名 with frame a.
例如:update a b with frame a. /*一次可以修改多个字段,用空格隔开即可*/

显示一条消息: message "想要显示的内容".
会在屏幕下方显示出引号中的字符串.

最简单的查找语句:
find first 表名 where 字段名>=条件 no-lock no-error.
if available 表名 then do: end.
else do: end.
例如: find first pt_mstr where pt_part = "123" no-lock no-error.
if available pt_mstr then do: message "找到啦". end.
else message "没找到". end.

在屏幕上显示数据:
display 变量名 字段名 字符串. /*中间用空格隔开*/
例如: display a pt_part "Progress".


如果要遍历某个表的所有数据:
for each 表名 where 条件 :
display 字段1 字段2 字段3.
end.
for each xxxx: end. 是固定格式,最后一定要加上end,否则报错.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/182208/viewspace-910393/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/182208/viewspace-910393/

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
QAD ERP专用数据库及程序开发语言手册 ABL Reference Preface This Preface contains the following sections: * Purpose * Audience * Organization * Using this manual * Typographical conventions * Examples of syntax descriptions * Example procedures * OpenEdge messages * Third party acknowledgements Purpose This book describes ABL (Advanced Business Language), which is the OpenEdge® programming language for building business applications. It covers all ABL statements, functions, phrases, operators, preprocessor directives, special symbols, widgets, handles, classes, interfaces, attributes, methods, properties, and events. Audience This book is intended for programmers who develop applications using ABL and for anyone who needs to read and understand ABL code. Organization This book consists of the following sections: * A dictionary of ABL statements, functions, phrases, operators, preprocessors, and special symbols. * A dictionary of ABL widgets. * A dictionary of ABL handles. * A dictionary of ABL attributes and methods (for handles). * A dictionary of ABL handle-based object events. * A dictionary of ABL classes and interfaces. * A dictionary of ABL properties and methods (for classes). * A dictionary of ABL class events and event methods * An index of ABL keywords. Using this manual OpenEdge provides a special purpose programming language for building business applications. In the documentation, the formal name for this language is ABL (Advanced Business Language). With few exceptions, all keywords of the language appear in all UPPERCASE, using a font that is appropriate to the context. All other alphabetic language content appears in mixed case. For the latest documentation updates see the OpenEdge Product Documentation Overview page on PSDN: http://communities.progress.com/pcom/docs/DOC-16074. References to ABL compiler and run-time features ABL is both a compiled and an interpreted language that executes in a run-time engine.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值