- 论坛徽章:
- 0
|
请问RPG有无可判断一个字符串是否由数字组成的函数?
*...1....+....2....+....3....+....4....+....5....+....6....+....7...
CL0N01N02N03Factor1+++OpcdeFactor2+++ResultLenDHHiLoEqComments++++++
C*
C* The field values are FLDA = 123, FLDB = 1X4, FLDC = 004,
C* FLDD = bbb, FLDE = b1b3, and FLDF = b12.
C*
C* Indicator 21 is set on because FLDA contains all numeric
C* characters.
C TESTN FLDA 21
C* Indicator 22 is set on because FLDA contains all numeric
C* characters. Indicators 23 and 24 remain off.
C TESTN FLDA 222324
C* All indicators are off because FLDB does not contain valid
C* numeric data.
C TESTN FLDB 252627
C* Indicator 28 is set on because FLDC contains valid numeric data.
C* Indicators 29 and 30 remain off.
C TESTN FLDC 282930
C* Indicator 33 is set on because FLDD contains all blanks.
C* Indicators 31 and 32 remain off.
C TESTN FLDD 313233
C* Indicators 34, 35, and 36 remain off. Indicator 35 remains off
C* off because FLDE contains a blank after a digit.
C TESTN FLDE 343536
C* Indicator 38 is set on because FLDF contains leading blanks and
C* low order digits. Indicators 37 and 39 remain off.
C TESTN FLDF 373839
應該可以,再試試看唄! |
|