?? date.clp
字號:
; This is the date function
; for reasons of computational simplicity, the date is represented
; as an integer which represents days since jan 1 1900.
; because CLIPS does not capture the return of system calls, the intermediate
; value is stored in a file.
(deffunction get-now ()
(system "date '+%y%t%j' > datefile.dat")
(open "datefile.dat" datefile "r")
(bind ?year (read datefile))
(bind ?day (read datefile))
(close datefile)
( +(div ?year 4) (* ?year 365) ?day)
)
(deffunction elapsed-time (?date)
(- (get-now) ?date))
; is date more than 6 mo ago?
(deffunction six-months (?date)
(< 180 (elapsed-time ?date)))
; is date more than 5 years ago?
(deffunction five-years (?date)
(< 1826 (elapsed-time ?date)))
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -