| 网站首页 | 业界新闻 | 小组 | 交易 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛

```create cursor b1 (m c(3),m1 n(3), m2 n(3))
insert into b1 values ("10",59,0)
insert into b1 values ("",10,0)
insert into b1 values ("011",82,0)
insert into b1 values ("01",75,0)
insert into b1 values ("",56,0)
SCAN
p1=LEN(ALLTRIM(m))
REPLACE m2 WITH IIF(p1>0,m1,0)
ENDSCAN
brow```

REPLACE ALL m2 WITH IIF(!EMPTY(m),m1,0)

[此贴子已经被作者于2020-9-22 20:58编辑过]

```create cursor b1 (m c(3),m1 n(3), m2 n(3),m3 n(3))
insert into b1 values ("10",59,40,0)
insert into b1 values ("",10,50,0)
insert into b1 values ("01",82,48,0)
insert into b1 values ("1",75,35,0)
insert into b1 values ("0",56,46,0)

scan
p1=ALLTRIM('m')+ALLTRIM(STR(LEN(ALLTRIM(m))))
REPLACE  m3 WITH IIF(LEN(ALLTRIM(m))>0,&p1,0)
endscan
BROWSE
```

[此贴子已经被作者于2020-9-22 21:19编辑过]

REPLACE ALL m3 WITH IIF(!EMPTY(m), EVALUATE("m"+TRANSFORM(LEN(ALLTRIM(m)))), 0)

REPLACE ALL m3 WITH IIF(!EMPTY(m), EVALUATE("m"+TRANSFORM(LEN(ALLTRIM(m)))), 0)

REPLACE ALL m3 WITH IIF(!EMPTY(m), EVALUATE("m"+TRANSFORM(LEN(ALLTRIM(m)))), 0)

p1="m"+TRANSFORM(LEN(ALLTRIM(m)))
REPLACE ALL  m3 WITH IIF(!EMPTY(m),&p1,0)

p1="m"+TRANSFORM(LEN(ALLTRIM(m)))
REPLACE ALL  m3 WITH IIF(!EMPTY(m),&p1,0)

p1="m1"
REPLACE ALL  m3 WITH IIF(!EMPTY(m),&p1,0)

REPLACE ALL  m3 WITH IIF(!EMPTY(m),m1,0)

p1="m1"
REPLACE ALL  m3 WITH IIF(!EMPTY(m),&p1,0)

REPLACE ALL  m3 WITH IIF(!EMPTY(m),m1,0)

kk1=OCCURS("M", m1 + m2 + m3 + m4 + m5)
kk2=OCCURS("P", P1 + P2 + P3 )
kk3=OCCURS("_", _1D + _2D + _3D + _4D )
.....
的kk1,kk2,kk3...统计数个数，能否一次性把他们用自定义过程，以便在后面的代码中逐一调用这些参数？

[此贴子已经被作者于2020-9-23 16:49编辑过]