变量:
标示符:第一个字符必须由下面的一个开头
字母
下划线(_).
百分号(%).
其余的字符可有以下的组成
字母
下划线(_).
百分号(%).
At signs (@).
Pound signs (#).
Dollar signs ($).
基本的数据类型:
%Binary 二进制数据%Boolean 布尔值
%Currency 货币
%Date 时间
%Float 浮点数
%Integer 整数
%List 列表
%Name 名字
%Numeric 实数
%Status 状态
%String 字符串
%Time 时间
%TimeStamp 日期+时间
Class Text.Patient Extends %Persistent { Property id As %Integer;// ID Property name As %Name;// 姓名 Property gender As %Boolean;// 性别 Property status As %Status;// 状态 Property birthday As %TimeStamp;// 生日 Property desc As %String;// 描述 Property expendamountAs %Currency;// 余额 Property picture As %Binary;// 头像 } |
存取方式:
1.web存储
2.对象存储
3.SQL存储
4.多维存储
常用函数:
时间函数:
$h 得到当前系统时间
USER>w $h //打印当前系统时间
63523,55713 //前半部分为当前日期,后半部分为时间
USER>w $zd("63523",3) //把得到的系统日期转换成YY-mm-DD
2014-12-02
USER>w $zt("55713",1) //得到的系统时间转换成 HH-mm-ss
15:28:33
USER>w $zdh("2014-12-02",3)//把秒数转换成时间戳
63523
USER>w $zth("15:28:33","3")//把秒数转换成时间戳
55713
USER>w $zdt($h,3) //把系统时间转换成YY-mm-DD HH-mm-ss
2014-12-02 15:42:54