PeopleCode筆記(一)

來源:互聯網
上載者:User

PeopleCode變數名都以&開頭,預設的局部變數類型為ANY。當返回資料類型不確定時為ANY,由PeopleTools決定其類型。

 

Local Any &Example_Any;
Local String &Test;
Local String &Test2;

 

&Example_any = "TEST";

&Example_Any = &Test | ' ' | &Test2;

 

/*%Date:今天*/

&Example_any = %Date;

 

BOOLEAN: TRUE(1) or FALSE(0).

 

LOCAL BOOLEAN &B_test;
&B_test = False;

 

DATE: YYYY-MM-DD

DATETIME: YYYY-MM-DD-HH.MI.SS.SSSSSS

TIME: HHMISS

 

NUMBER: 整數或者小數

 

&Number_example1 = 456;
&Number_example2 = 456.78;
&Number_example3 = 0.45678;
&Number_example4 = -456.78;

 

FLOAT: 浮點小數

 

INTEGER: 整數,32位有符號數;PeopleCode中除法運算即使定義成INTEGER不會用到INTEGER,而是用浮點數

 

Local INTEGER &Sample1, &Sample2, &Sample3;
&Sample1 = 44;
&Sample2 = 11000;
&Sample3 = -2200;

 

STRING: 可以使用單引號或者雙引號

 

&sample_string = "Now is the time for all good men to come to the aid of their country";
&sample_string2 = "Now is the time for all good men to come to the aid of their country 'string within a string' declaration";
&sample_string3 = "Now is the time for all good men to come to the aid of their country "double quoted string within a string" declaration";

 

OBJECT:

PeopleCode Data Buffer Access Types: Field, Record, Row, Rowset.

PeopleCode Display Data Types: AnalyticGrid, Chart, Grid, GridColumn,Page

PeopleCode Internet Script Data Types: Cookie, Request, and Response

PeopleCode Miscellaneous Data Types: AESection, AnalyticInstance, Array, Crypt, Exception, File, Interlink, BIDocs, JavaObject (can only be declared as type Local), Message, MCFIMInfo, OptEngine, PostReport, ProcessRequest, RowsetCache, SoapDoc, SQL, SyncServer, TransformData(can only be declared as type Local), XmlDoc, and XmlNode (objects can only be declared as type Local)

Global ApiObject Data Type Objects: Session, PSMessages collection, PSMessages, all tree classes (trees, tree structures, nodes, levels, and etc.), query classes.

Local ApiObject Data Type Objects: Meta SQL, Meta HTML, System Variables, and RowSet

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.