Quantcast
Channel: Visual COBOL
Viewing all articles
Browse latest Browse all 5819

Forum Post: RE: Formatting numeric data items

$
0
0
Hi Add this in 01  DecmialValue-E  PIC  ZZ,ZZ9.99-. then    MOVE DecimalValue TO DecimalValue-E. and then work with the 'edited' field DecimalValue-E which will show 4 leading spaces 99.00 and one trailing space for the minus sign to use if the value becomes negative The Zs in the edit mask will show as spaces unless there is a significant digit to be used And the comma to demark the thousands will also be blank unless it is needed to be invoked Once you have created the edited version, your original set textBox1::Text to DecimalValue::ToString() should work OK once adjusted to refer to DecimalValue-E Note 1: DecimalValue-E will occupy 10 positions - you can count the characters in the 'edit mask' Note 2: there would be other ways to do this - this is just one simple way

Viewing all articles
Browse latest Browse all 5819

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>