没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
About IFS Client Developer Help
The IFS Client Developer help system provides quick lookup information on all of
IFS Client Developer features.
Scalable Application Language
Scalable Application Language (SAL) is a procedural language used for writing Centura actions
(procedures) that you want your application to execute when events take place.
You add SAL statements
to:
• The Application Actions
section of an outline.
• The Actions section of an Internal Function.
• The Menu Actions section of a menu item.
• The Message Actions
section of an object.
See Also
Conventions
Statements
Operators
Data Types
Arrays
Variables
Constants
Expressions
Command Line Arguments
System Functions
Internal Functions
External Functions
Conventions
Conventions and standards exist and should be maintained when defining objects, variables,
and constants, and adding SAL statements to your application outline.
Following are some general rules and guidelines you should remember:
• Centura is case sensitive. Upper and lower case characters are interpreted differently.
• Prefixes of objects, functions, and messages are important for maintaining consistency
within an application, and for making it easy to read.
SAL functions start with the prefix ‘Sal’ or 'Sql'.
SAM messages start with the prefix ‘SAM_’.
Centura objects start with the following prefixes:
Object Prefix
Check Box
cb
Combo Box
cmb
Data Field
df
Dialog Box
dlg
Form Window
frm
List Box
lb
Multiline Text Field
ml
Picture
pic
Push Button
pb
Radio Button
rb
Scroll Bar (Horizontal/Vertical)
sb
Table Window
tbl
Centura constants and variables start with the following prefixes:
Data Type Prefix
Boolean
b
Date/Time
dt
File Handle
fh
Long String
ls
Number
n
Sql Handle
hSql
String
str
Window Handle
hWnd
Statements
Following is a list of keywords you use in building SAL statements. Add SAL statements to:
• The Application Actions
section of an outline.
• The Actions section of an Internal Function.
• The Menu Actions section of a menu item.
• The Message Actions
section of an object.
You code SAL statements in these sections:
• Message Actions.
• Function Actions.
• Application Actions.
• Menu Actions.
The SAL keywords are:
Break
Call
If-Else,Else-If
Loop
On
Return
Select Case, Case, Default
Set
When SqlError
While
Break
Break terminates the Loop or While statement under which it is nested. This lets you break out
of more than one level of loop.
If you specify a loop name, that loop terminates. If you do not specify a loop name, the
statement breaks out of the nearest loop level.
You can also use Break to terminate a Case item under a Select Case
statement.
The syntax is:
Break [loop_name]
This example fetches rows and breaks out of one level of loop on a return of FALSE:
Loop
If NOT SqlFetchNext ( hSql, nInd )
Break
If nInd = FETCH_EOF
Call SalMessageBox ( ‘No more rows’, ‘Select’, MB_Ok )
Break
Call
Call executes a function.
The syntax is:
Call Function_name (parameters)
This example calls two functions, SalStrUpper and SqlImmediate:
Call SalStrUpper ( strSource, strTarget )
Call SqlImmediate ( ‘DELETE FROM CUSTOMER WHERE NAME = :fldName’ )
If Else or Else If
Use If Else or Else If to express options. Indentation determines the conditional flow of control.
The Else If or Else portion is optional. You can add as many levels of Else If statements as you
like, but there can only be one Else statement.
The syntax is:
If Expression1
Statement1
Else If Expression2
Statement2
Else
Statement3
In the syntactic example above, Centura evaluates Expression1. If it is true, Statement1
executes. If it is false, Centura evaluates Expression2. If Expression2 is true, Statement2
executes. If it is false, Statement3 executes.
Example:
If fldB = ‘M’
Call ProcessMale ( fldSex )
Else If fldB = ‘F’
Call ProcessFemale ( fldSex )
Else
Call ProcessOther ( fldSex )
You can also code the preceding actions using a slightly different style (nested Ifs):
If fldB = ‘M’
Call ProcessMale ( fldSex )
Else
If fldB = ‘F’
Call ProcessFemale ( fldSex )
Else
Call ProcessOther ( fldSex )
Loop
Loop repeats any child statements indented under it until a Break or Return executes.
The syntax is:
Loop [loop_name]
where the loop name is optional.
Example 1:
Set Count = 0
Loop
If Count = 100
Return TRUE
Set Count = Count + 1
Example 2:
Set y = 0
Set z = 0
Loop Outer
If z > 10
Set z = z + 1
Break
Loop Inner
If y > 10
Break
If GetData = 10
Break Outer
Set GetData = ValCheck ( )
Set y = y + 1
On
On relates a message to the SAL statements that execute when that message is received by an
object. Use On statements only in an object's Message Actions
section or the outline's
Application Actions
section.
You can identify messages by their numbers, or by their constant names which symbolize their
values. For example, when an application receives a SAM_AppStartup message, the SAL
statements coded in the application's Application Actions section of the outline execute.
The syntax is:
On Message
In this example, when the application starts, a modal dialog box appears that lets you login:
Global Declarations
...
Application Actions
On SAM_AppStartup
Call SalModalDialog ( LoginBox, hWndNull )
Return
Return breaks the flow of control and returns a value to the caller.
The syntax is:
Return Expression
Example:
Message Actions
On SAM_KillFocus
Return SalIsNull ( fldName )
If you are using a function that returns a Boolean value but you do not include a Return
statement in your code, the function returns FALSE.
If you are using a function that returns a numeric value but you do not include a Return
statement in your code, the function returns zero (0).
Select Case, Case, Default
Use Select Case when you have a series of conditions that you want to test.
With the Select Case statement, Centura successively compares the value of an expression
against Case constants. Both the expression and the constants must be number data types.
A Break statement signals the end of a Case, and terminates execution of the Select Case
statement. You must have a Break at the end of each Case statement unless you want the
program to continue execution through to the next Case. The Default case is optional, and if it is
present, it is placed at the end of the Select Case statement. It executes when the value of the
expression does not match any of the case constants.
The syntax is:
Select Case (Expression)
Case Constant1
Statement1
Break
Case Constant2
Statement2
Break
Default
Statement3
In the above example, Centura evaluates Expression. If its value matches that of Constant1,
then Statement1 executes. If its value matches that of Constant2, then Statement2 executes. If
no Case constant value matches that of Expression, then Statement3 executes.
You can specify as many Case constants as you want, but there can be only one Default section.
Indentation determines the conditional flow of control. Use Break to terminate a Case.
To allow more than one Case constant to execute the same statement, stack them like this:
Select Case (Expression)
Case Constant1
Case Constant2
Statement1
剩余2016页未读,继续阅读
资源评论
叡
- 粉丝: 1
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于DSP的2KW单相光伏并网逆变器设计
- Linux初学者入门教程(全英文)
- mipi IP核,纯HDL实现,4lane传输 适用于所有型号FPGA芯片,纯逻辑实现 不管是ov还是索尼,只要是mipi协议的都可以使用 提供xilinx zynq和lattice两个型号例程,
- 基于消纳责任权重的两级电力市场优化运行模型 在电力消纳保障机制和新配额制的实施背景下,为了使省内消纳责任主体完成消纳考核,如何利用市场机制激励可再生能源跨省跨区消纳是关键问题之一 为此,借助于省间
- Virtual lab计算电机振动噪音
- 光伏逆变器,3.6kw储能逆变器全套资料 STM32储能逆变器 BOOST 全桥 基于STM32F103设计,具有并网充电、放电;并网离网自动切;485通讯,在线升级;风扇智能控制,提供过流、过压、
- 电机控制器,谐波电流注入 为解决汽车NvH而开发,旨在消除转矩谐波,降低运行噪声…… 已成功应用于geely某项目
- fpga pcie软核,用于扩展硬核不足的场景,例如nvme大容量存储
- 纯电动汽车Matlab Simulink软件模型,纯电动汽车动力性、经济性仿真模型 1.本模型基于Matlab Simulink搭建,包含:电池、电机、整车纵向动力学、控制策略、驾驶员等模块 2.模
- 随机配置网络SCN做单输入单输出的时间序列拟合预测建模 程序内注释详细直接替数据就可以用 程序语言为matlab
- 模拟背靠背HVDC模块化多电平流器(MMC)作为为整个电网供电的电能质量调节系统 因此,模块化多电平逆变器作为远程端转器运行,也称为孤岛模式 这种电能质量调节系统的主要目标是能够保护敏感的电网免受
- 三菱PLC焊接机控制参考程序 包含触摸屏程序,PLC程序,IO表,伺服参数,通讯协议参数 该设备由24个伺服电机、1套焊接机、2套CCD、4套扫码枪、6套位移传感器组成,plc程序有注释里面fb块
- 汇川AM401系列程序 汇川AM403程序,搭配汇川总线伺服,汇川IT7070系列触摸屏 全自动N95口罩机 大型程序近20000步,凸轮同步控制,凸轮曲线应用,超声波焊接机控制,放卷张力控制,封边轴
- comsol,简单离子沉积电场分布 (不包含沉积过程)
- 电机控制器,英飞凌电动汽车参考方案,包含原理图,和Bom清单,和代码,基于英飞凌TC27xC平台 非常经典的设计方案,很有参考价值,有说明文档
- EP100伺服驱动器量产型全套C源代码和硬件 迈信EP100伺服驱动器量产型修改bug全套C源代码和硬件 1 Altiumn Dsigner硬件图纸,含主控板、驱动板、显示板的电路原理图和PCB文件
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功