adesutherland / CREXX

REXX Language implementation
Other
13 stars 3 forks source link

F0038: Substr() allows a pad of "" #280

Closed rvjansen closed 2 years ago

rvjansen commented 2 years ago
if substr("René Vincent Jansen",6,7,"") \= 'Vincent' then
  do errors=errors+1
    say 'SUBSTR failed in test 16 '
  end

this currently passes the test but should be Error 40.23: SUBSTR argument 4 must be a single character; found "". (also in error with oorexx; NetRexx does the right thing - throws a NotCharacterException)

Peter-Jacob commented 2 years ago

please try new substr version with commit: 9a46395085a94ed51793e3c585549c4ca971bdfc. Drawback: The raise instruction will end the testing script immediately.

rvjansen commented 2 years ago

works!