??xml version="1.0" encoding="utf-8" standalone="yes"?>
SELECT myNum, SUM(myValue) FROM anotherTable GROUP BY myNum WHERE myNUM <= 100;
---------------------------
return [#CurrentVersion, #CurrentList];
---------------------------
if (typeof(conPeek(packedClass,1)) != Types::INTEGER)
---------------------------
new MenuFunction(menuItemDisplayStr(SalesTable), MenuItemType::Display).run(args);
---------------------------
Query querySalesTable;
querySalesTable.dataSourceTable(tableNum(SalesTable)).addRange(fieldNum(SalesTable, InterCompanyOrder)).value(queryValue(NoYes::Yes));
---------------------------
Common common;
;
this.handleDeleteActions(sysDictTable);
common = sysDictTable.makeRecord();
common.skipDatabaseLog(true);
common.skipDataMethods(true);
common.skipDeleteActions(true);
delete_from common;
----------------------------
Dictionary dictionary = new Dictionary();
tableId = dictionary.tableNext(tableId);
----------------------------
tableNum(SalesTable):
----------------------------
MyTable myTable;
RecordInsertList insertList = new RecordInsertList(myTable.TableId, True);
int i;
for ( i = 1; i <= 100; i++ )
{
myTable.value = i;
insertList.add(myTable);
}
insertList.insertDatabase();
}
-----------------------------
int p2 = strFind(line,' ',p1,strLen(line));
return subStr(line,p1,p2-p1);
----------------------------------
if (o && (o.handle() == classIdGet(fr))
--------------------------------
return (dictFeatureKey.rights() != AccessType::NoAccess) ? true : false;
-------------------------------
kmQuestion.answerInputType = KMQuestionAnswerInputType::CheckBox;
kmQuestion.answerInputType = KMQuestionAnswerInputType::ComboBox;
kmQuestion.answerInputType = KMQuestionAnswerInputType::RadioButton;
kmQuestion.answerInputType = str2Int(kmQuestion.DEL_answerModeSelection);
--------------------------------
select sum(correctAnswer) from KMVirtualNetworkAnswerLine
group by kmVirtualNetworkAnswerTableId, kmQuestionResultGroupId
--------------------------------
kmConnectionType.refFieldId = fieldNum(HRMCourseTable, description);
--------------------------------
segment += ':' + date2str(_date,321,2,0,2,0,4)+ subStr(time2str(_time,1,1),1,2) +
subStr(time2str(_time,1,1),4,2) + subStr(time2str(_time,1,1),7,2);
--------------------------------
Dialog dialog = new Dialog("@SYS73363");
DialogField dlgClassTypeName = dialog.addField(typeId(className));
Editor editor
--------------------------------
filename = WinAPI::getSaveFileName(0, ['Text','*.txt'], '', "@SYS56237", 'txt', defaultName );
if (filename)
{
io = new AsciiIo(filename, 'W');
io.write(EditorScripts::getSelectedText(e));
}
---------------------------------
switch (version)
{
case(#CurrentVersion) :
[version,#CurrentList,packedQuery] = packedClass;
if (packedQuery)
qr = new QueryRun(packedQuery);
break;
default :
return false;
}
--------------------------------
select workCalendarDateLine
index CalendarDateFromIdx
where workCalendarDateLine.calendarId == calendarId
&& workCalendarDateLine.transDate == transDate
---------------------------------
#define.dateFormat('DD/MM/YYYY hh:mm:ss')
default:
warning(strFmt("@SYS24561",classIdGet(gantt)));
--------------------------------
AsciiIo logFile = new AsciiIo(#VTHeapLog, 'a');
;
logFile.write(this.prompt(' Unfreed object'), conPeek(data,2));
--------------------------------
select firstonly ledgerPeriod
order by periodStart desc
where ledgerPeriod.periodStart <= _transDate &&
ledgerPeriod.periodCode == _periodCode;
---------------------------------
client server static boolean checkFailed(SysInfoLogStr txt, URL helpURL = '', SysInfoAction _sysInfoAction = null)
{
if (BMMainControl::inAction())
appl.BMaddInfo(Exception::Info,txt);
else
infolog.add(Exception::Warning, getprefix()+txt, helpURL, _sysInfoAction, false);
return false;
}
------------------------------------
switch(itemCode)
{
case TableGroupAll::Table : return item;
case TableGroupAll::GroupId : return groupId;
case TableGroupAll::All : return '';
}
TableGroupAll::Table//是个枚DcdQbase enumQ?br />------------------------------------
void new(CurrencyCode _currencyCode)
{;
currencyCode = _currencyCode;
exchRate = 0;
exchrateSecondary = 0;
exchRatesTriangulation = UnknownNoYes::Unknown;
}
//当徏立一个对象的时候会调用此方?br />------------------------------------
// Create a list iterator
it = new listIterator (il);
print it.definitionString(); // prints “int list iterator?br /> print it.toString(); // prints ?begin)[4]?br />// Go on for as long as elements are found in the list...
while (it.more())
{
// fetch the next element
print it.value(); // prints 4 2 1
it.next();
}
print it.toString(); // prints (end)
pause;
int i=0;
str name="XMDDL369";
real r_i=23.789;
boolean b=false;
date d1=11\11\2000;
date d3 = 21\11\1998;
Integer s=90;
int a_i[3];
a_i[0]=1;
//H̔éùu¾µÄÊý¾ÝÀàÐÍnR䛠tºÏÀàÐÍ
//ÈçºÎÍt¹ýÀàÈ¡µÃÊý¾ÝHâµÄÁRÓnR·µØÇÂ䛠tº
//ÒìnµÄ̔¶×ºÍ´ÀT
//uäÁHµÄ×÷ÓÃÓò
//int a_j[3]={1,2,3};
//*********************
print hw.sayHello()+" XMDDL369";
while(i<10){
print i;
i++;
}
print name;
print r_i;
//print any2str("90.9")+name;
if(b==true)
print "b is true";
else
print "b is not true";
print d3;
print dayofmth(d3);
print dayofwk(d3);
print dayofyr(d3);
print s;
hw.sayWorld();
try
{
print i/0.9;
}
catch (exception::error)
{
print "u 0 ý";
}
///////////////////////////
////////Êý¾ÝHâ̔Ù×÷//////////
////////////////////////////
//hw.find();//̔éÑtÊý¾ÝHâÈ¡µÃÇÂ
//hw.insert(); //Ôö¡É¾¡TÄ¡̔éntCRUDn©
//hw.update();
//hw.delete();
hw.executeBySQL(sql);
}
Q?Qmethod findQ)Q?br />void find()
{
UserInfo ui;
select ui where ui.name=="xmddl";
print ui.password;
while select ui
{ //̔éÑtËùÓеÄÇÂ
print ui.name+" "+ui.Id;
}
}
Q?Q、method deleteQ)Q?br />void delete()
{
Userinfo ui;
ttsbegin;
select forupdate ui where ui.Id=="new";
//ui.Id="new";
ui.delete();
//ui.doDelete();
ttscommit;
}
Q?Q、method updateQ)Q?br />void update()
{
Userinfo ui;
ttsbegin;
select forupdate ui where ui.id=="new";
ui.name="xmddl369";
ui.password="hello new";
ui.update();
ttscommit;
}
Q?Q、method insertQ)Q?br />void insert()
{
Userinfo ui;
ttsbegin;
ui.Id="new";
ui.name="xmddl";
ui.insert();
ttscommit;
/* ÅúÁHTüÐÂ
MyTable myTable;
RecordInsertList insertList = new RecordInsertList(myTable.TableId, True);
int i;
for ( i = 1; i <= 100; i++ )
{
myTable.value = i;
insertList.add(myTable);
}
insertList.insertDatabase();//<-----this is
*/
}
Q?Qmethod executeBySQLQ)Q?br />void executeBySQL(Str sql)
{
Connection con=new Connection();
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery(sql);
//stmt.executeUpdate(sql);
while(rs.next()){
print "SQL "+rs.getString(1);
}
}
for(m=0;m<10;m++){//can not define int m=0 in this
print m;
}
4、开发环境概览:
int main(){
cout<<"Hello World\n";
return 0;
}
Q?Q基本数据类?63个关键字
char 1b
wchar-1 2b
int(16bit) 2b
int(32bit) 4b
float 4b
double 8b
bool N/A
void N/A
Q?Q注释类似c
Q?Q{义字W?br />\b退?br />\f换页
\n换行
\r回R
\t水^制表
\"双引?br />\'单引?br />\\破折?br />
\v垂直制表W号
\a喇叭嗡鸣
\?问号
\N八进制常?br />\xN十六q制帔R
Q?Q运符Q类似c
Q?Q程序控制语句,cMc
Q?Q字W串和数l?br />Q?Q指?br />Q?Q函敎ͼ引用、重载、默认参?br />Q?0Q更多的数据cdQ结构和联合Q类似cQ?br />--------------------
Q?1Q类
iQ构造函数和析构函数
iiQ访问限定符
iiiQ友员函?br /> iiiiQ运符重蝲
iiiiiQѝ封装、多?br />Q?2Q模?br />Q?3Qc++的IOpȝ
Q?4Q名字空?br />Q?5Q标准模板库
Q?6Qc++预处理器
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
/*
q里为多行注?br />fdsfsdfds
*/
time mytime
date mydate=2006-07-07
datetime mydatetime
char c='w'
string hello="it~'s a dog"http://it's a dog
any my,you,he
blob bk
boolean b
long l
int iss
ResultSet rs
resultsets rss //不区分大写
//q算W?br />/*
1、算术运符:*???、^
2、逻辑q算W?NOT、AND、OR
3、关p运符:=?gt;=?gt;?lt;?lt;=?lt;>
4、连接运符:&
*/
jj+=jj+ii
jj=jj/ii
jj=jj*ii
jj -=ii
jj +=ii
//E序控制语句Q选择、@环、其他语?br />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创徏可视化对?/font>
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成功QSQLCodeQ?1p|QSQLCode=100SQL语句没有q回数据
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~程Qpb的特?br />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
语句不以分号l束