因为专业所以放心

学习是没有起点和终点的......

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  15 Posts :: 0 Stories :: 1 Comments :: 0 Trackbacks

//数据类型的说明,不区分大小写
String name="xmddl"
Integer i
Real s       //这里为单行注释
Integer a[1 to 10]
real i_s[4]={1,2,3,4}
CONSTANT String j="HELLO"

real ii_s[2,4]={1,1,1,1,2,2,2,2}
string s_s[2,3,4]

dec{2} fj
dec jj,ii
double d
/*
这里为多行注释
fdsfsdfds
*/
time mytime
date mydate=2006-07-07
datetime mydatetime
char c='w'
string hello="it~'s a dog"//it's a dog

any my,you,he

blob bk
boolean b
long l
int iss
ResultSet rs
resultsets rss //不区分大小写
//运算符
/*
1、算术运算符:*、/、+、-、^
2、逻辑运算符:NOT、AND、OR
3、关系运算符:=、>=、>、<、<=、<>
4、连接运算符:&
*/
jj+=jj+ii
jj=jj/ii
jj=jj*ii
jj -=ii
jj +=ii

//程序控制语句:选择、循环、其他语句
if jj>ii then
 //todo......
end if 

if jj>ii then
 //todo...
elseif jj=ii then
 //todo...
end if


string sss_s
sss_s = create using "string"

transaction DBTrans
DBTrans=create transaction
DBTrans.autocommit=false

DESTROY DBTrans//销毁create创建的对象,open创建可视化对象

CHOOSE CASE jj
 CASE 1
  //TODO...
 CASE 2
  //TODO...
 CASE ELSE
  //TODO...
END CHOOSE

/*(循环判断)
.... DO UNTIL condition …LOOP
.... DO WHILE condition … LOOP
.... DO … LOOP UNTIL condition
.... DO … LOOP WHILE condition

FOR varname = start TO end [STEP increment]
statementblock
NEXT

*/

SQLCA.dbms="localhost"
//SQLCode=0成功,SQLCode=-1失败,SQLCode=100SQL语句没有返回数据

CONNECT USING SQLCA;

DECLARE EMP_cur CURSOR FOR
select employee.fname
from employee
where employee.job_id =:i;
OPEN EMP_cur;
FETCH EMP_cur INTO :sss_s;
CLOSE EMP_cur;

select employee.fname into :sss_s //嵌入sql编程,pb的特色
from employee
where employee.job_id =:i


using DBTrans;

if DBTrans.sqlcode=0 then
 //todo...
 COMMIT USING DBTrans;//事务提交
else
 //toto...
 ROLLBACK USING DBTrans;//事务回滚
end if
DISCONNECT USING SQLCA;


(1)、HALT、HALT(CLOSE)
(2)、RETURN
(3)、CREATE
(4)、DESTROY
语句不以分号结束

posted on 2006-08-05 09:53 舞熙 阅读(323) 评论(0)  编辑  收藏 所属分类: 程序设计语言

只有注册用户登录后才能发表评论。


网站导航: