Project

General

Profile

Bug #5909

Problem with conversion of STRING(char. char)

Added by Igor Skornyakov over 2 years ago. Updated over 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
12/20/2021
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:

History

#1 Updated by Igor Skornyakov over 2 years ago

It seems that we have a problem with the conversion of the STRING(chat, char) 4GL function when the expression is not in the WHERE clause. The expression

rc = string(val, fmt) no-error.

is converted to
silent(() -> rc.assign(valueOf(val, fmt)));

instead of
silent(() -> rc.assign(toString(val, fmt)));

Unlike toString(), character.valueOf throws NumberFormatException which causes the NO-ERROR clause to be ignored and it results in the application premature termination.

#3 Updated by Greg Shah over 2 years ago

The Java replacement for 4GL builtin function STRING() is valueOf(). The converted code is correct.

If there is some problem in the runtime error handling, then it can be fixed.

Also available in: Atom PDF