Consultor Eletrônico



Kbase P22600: STRING-VALUE returns a zero-length string instead of unknown (?)
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   1/12/2007
Status: Unverified

SYMPTOM(s):

STRING-VALUE returns a zero-length string instead of unknown (?)

STRING(?,'x(25)) returns an empty string value ("") rather than the unknown (?) value

Documentation states that:
"The STRING-VALUE attribute uses the format attribute to convert the buffer value to a string."

CAUSE:

This is expected behaviour. The STRING-VALUE was originally intended to use with OCX's and 3rd party grids, these 3rd party items would not understand Progress' unknown (?) value. Therefore the decision was made to return "" for compatibility.

In addition, a STRING-VALUE of unknown in any expression would make the whole expression unknown. So in the case of 'STRING-VALUE + "abc"' the current result would "abc". This way if there was any data in the expression it would not be lost. If Progress was to change the STRING-VALUE return type to unknown, this example would return unknown instead of the "abc". This not only provides a reason for STRING-VALUE to return "" instead of unknown, but also makes it impossible to changes at this point.

FIX:

If there is a requirement to change this behaviour, please log an enhancement request via Progress' Enhancement Request System, available here:
http://www.progress.com/cgi-bin/ers.cgi/login.htm