cache学习笔记
- 进入dhc-app:
zn "dhc-app"
- 编译出问题退出重进:
DHC-APP 3f2>k
DHC-APP 3f2>q
- 循环输出:
Class web.NewClass6 Extends %Persistent
{
ClassMethod aa(id,c,d)
{
for i = id:c:d
{
s b=$o(^CTLOC(i))
s a=$p($p(^CTLOC(i),"^",2),"-",2)
w a ,!
}
}
}
4.时间转换方法
USER>w $h
65119,41852
USER>w $zd(65119,3)
2019-04-16
USER>w $zd(65119,1)
04/16/2019
USER>w $zdh("2019-04-16",3)
65119
USER>w $zt(41852)
11:37:32
USER>w $zth("12:00:00")
43200
5.studio查看global
zw global名(rowID)
^PAADM(1110)="330475^O^^118^^63805^39658^^854^^^^N^^^^^^^A^^^^^^N^^Y^^^^^^63805^39658^N^^^^^63805^39658^41^^N^^^^^^^^^^^^^^^^1110^^^^^^^^^^^R^^^^^^^^^OP0000001075^"
^PAADM(1110,1)="^^^1110^^^2^^^^^^^^N^^^^^^^N^N^^^^^^^^^^^^^^^N^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
^PAADM(1110,2)="^^^^^^^^^^^^^^^^^^^^N^^^^N^^^^^^N^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^N^^^^^^^^^^^^^^^^^^^"
^PAADM(1110,3)="^^^^"
^PAADM(1110,"ADM2")="^^^^^^^^^^^^^^^^^^^^^^^^^aaa^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
^PAADM(1110,"ADM2","FRCMT",0)=0
^PAADM(1110,"ADMFIM",0)=0
^PAADM(1110,"CHADR",0)=0
^PAADM(1110,"CMT",0)=0
^PAADM(1110,"CONF",0)=0
^PAADM(1110,"DEL",0)=0
^PAADM(1110,"DHC")="^^^^^^^^^118^^^^^^^^^^^^^^^20^"
^PAADM(1110,"DLN",0)=0
^PAADM(1110,"INTERV",0)=0
^PAADM(1110,"PLN",0)=0
^PAADM(1110,"RAD",0)=0
6.$case用法
$case(aa,01:“a”)
相当于 if 01 return a
DHC-APP>s aa = 01
DHC-APP>s bb = 02
DHC-APP>w $case(aa,01:"a")
a
DHC-APP>w $case(bb,02:"a")
a
DHC-APP>w $case(bb,02:"b")
b
DHC-APP>w $case(aa,02:"b")
W $CASE(aa,02:"b")
^
<ILLEGAL VALUE>
DHC-APP>
7.小数点后取值
$fn:四舍五入取值
$e:直接舍去后面的
USER>zn "dhc-app"
DHC-APP>s a = 3.1415926
DHC-APP>w $e(a,1,5)
3.141
DHC-APP>w $fn(a,",",2)
3.14