Project

General

Profile

Bug #5554

FWD processed (0) format element in a non-compatible way

Added by Igor Skornyakov almost 3 years ago. Updated almost 3 years ago.

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

0%

billable:
No
vendor_id:
GCD
case_num:

History

#2 Updated by Igor Skornyakov almost 3 years ago

The '(0)' format element in the 4GL string(char, char) has a strange effect. For example:

string('3.1415926', 'N(0)#a(2)') = '3)#'
string('acc3.1415926', '9!(0);N(4);;#a(2)//') = 'aC);c3.1;;#41'

I cannot understand the underlying logic so far. In particular ignoring trailing format elements.
Please note that Java UDF produces another (more logical) result:
select public.tostring('acc3.1415926', '9!(0);N(4);;#a(2)//')

returns 'aC;c3.1;;#41//'

#3 Updated by Igor Skornyakov almost 3 years ago

Greg suggested an explanation of the underlying 4GL logic. See #4551-131.
My test (xfer.goldencode.com/opt/testcases/formats/stostring.p) show that this explanation looks correct.

Also available in: Atom PDF