字元處理只針對c、n、d、t、string型別,不做型別轉換,都按照c型別處理,也可以處理這些型別構成的結構體,有專門的字串比較、定位操作;
*concatenate first_name last_name into first_name separated by separate.
*write / first_name.
split first_name at separate into first_name last_name.
write / sy-subrc.
*sy-subrc 0 ok 4 truncated
write / first_name.
write / last_name.
data: text type string,
table type table of string.
text = 'this is a program language'.
search text for 'pro'.
*search text for '.pro'.
*search text for '*pro'.
*search text for 'pro*'.
write / sy-subrc.
write / sy-fdpos.
while sy-subrc = 0.
replace ' ' with '-' into text.
endwhile.
write / text.
data length type i.
length = strlen( text ).
write / length.
split text at '-' into table table.
loop at table into text.
write / text.
endloop.
shift、condense、translate、convert text、overlay;
比較表示式萬用字元號* + 轉義字元 # 如#a、#a、#*、#+、##、# ;
data: str(10) type c value 'abcdefghi',
num(10) type c value '0123456789'.
write / str+2(3).
num+3(2) = str+2(2).
write / num.
write / sy-datum+4(2).
可以使用變數的情況:move語句或賦值運算子、write to語句、assign語句分配符號、perform傳送資料給子程式; C 學習筆記 九
第9講事件1 現在來講一下事件。我們知道windows作業系統是乙個基於事件的作業系統。掌握事件的機制對gui程式設計能有著非常重要的意義。事件是類在發生其關注的事情時來提供通知的一種方式。例如,封裝使用者介面控制項的類可以定義乙個在使用者單擊該控制項時發生的事件。控制項類不關心單擊按鈕時發生了什麼...
Linux學習筆記(九)
本人使用的是centos 由於用使用些特殊命令,不得不修改系統的時間這裡總結如下 date 檢視系統時間 date s 03 04 2013 將系統日期設定為2013年03月04日 date s 110 38 將系統時間設定為上午 10 38 修改完後執行 clock w 強制將時間寫入coms!先...
Python學習筆記(九)
python 對檔案的操作 1 fp open filename r 以讀的方式開啟檔案 w 以寫方式開啟,a 以追加模式開啟 從 eof 開始,必要時建立新檔案 r 以讀寫模式開啟 w 以讀寫模式開啟 a 以讀寫模式開啟 rb 以二進位制讀模式開啟 wb 以二進位制寫模式開啟 ab 以二進位制追加...