EDI.Net icon indicating copy to clipboard operation
EDI.Net copied to clipboard

Revisit the formatting and the PICTURE syntax.

Open cleftheris opened this issue 8 years ago • 1 comments

either fully support the cobol picture syntax as described here and there, or maybe map to a dotnet friendly alternative like implementing the IFormatProvider and ICustomFormatter interfaces and using string.Format.

cleftheris avatar Oct 12 '16 16:10 cleftheris

Some more insight on this. The picture syntax as far as the EDI is concerned is a form of format string, meaning that it could be used for one of two things.

  1. Validating the incoming transmission component values
  2. When serializing it can used as a format mask (similar to what #,##0.00 is to formatting numbers in dotnet). Check the issue #20 when reading numeric values. There are some cases of incoming transmissions where integers and floats are padded with leading Z characters instead of whitespace or zeros 0 which is the common case in dotnet.

cleftheris avatar Nov 11 '16 09:11 cleftheris