分别提取“-”两边的数字,并分别求和

默认分类 | 2021-04-14 10:02:03 | 阅读 121 次 | 评论(0)
CLEAR
TEXT TO lcText NOSHOW TEXTMERGE
62B19B11-B12A9B
62B19B11-A2B
62B19B10-B11J
62B19B10-0B
62B19B4-B10J
62B19B4-A2B
62B19-B25J
62B19-B4J
62B17-B19J
62B17-B2B
62B16A16B3A3-A4B18B
62B16A16B3A3-A7B
62B16A16B3-B4B14J
62B16A16B3-A3J
62B16A16-A17B
62B16A16-B3J
88B5-A3A4J
ENDTEXT

lcStr = ""
FOR lnJ = 1 TO 23 
	lcStr = lcStr + ',"' + CHR(lnJ + 64) + '"'
ENDFOR
lcStr = SUBSTR(lcStr, 2)
FOR lnM = 1 TO ALINES(laa, lcText)
	? SPACE(5) + TRANSFORM(lnM, "@L 99"), laa[lnM]
	FOR lnJ = 1 TO ALINES(lab, laa[lnM], "-")
		? SPACE(8) + lab[lnJ] + " = "
		lc = ""
		FOR lnK = 1 TO ALINES(lac, lab[lnJ], 5, &lcStr)
			lc = lc + IIF(EMPTY(lc), "", " + ") + lac[lnK]
		ENDFOR
		??  lc + " = " + TRANSFORM(EVALUATE(lc))
	ENDFOR
ENDFOR 
文章评论,共0条
游客请输入验证码
文章分类
最新评论