通过CO操作符实现:
DATA: str1(50) TYPE c VALUE '56.000',
str2 TYPE string VALUE '.0123456789',
str3 TYPE string.
str3 = str1.
IF str3 CO str2.
MESSAGE 'Correct' TYPE 'S'.
ELSE.
MESSAGE 'Error' TYPE 'S' DISPLAY LIKE 'E'.
LEAVE LIST-PROCESSING.
ENDIF.
网友评论