CNV BIN


Expected Behaviour

o UNICODE Alpha Field from Numeric field or NATIONAL Alpha Field from Numeric Field

  • Converts the value of the specified Numeric Field to a 4-byte unsigned binary integer and stores it in the 1- character (4-byte) Unicode/National Alpha field.
  • The UNICODE/NATIONAL Alpha Field must be defined as a 1 character (4-byte internal length) field.
  • Em build should fail if the character length of the UNICODE/NATIONAL Alpha Field is greater than 1 character.
  • An Overflow error should occur at runtime if the value of the Numeric Field is greater than the maximum value that can be stored in a 4-byte unsigned binary integer.
  • An Overflow error should occur at runtime if the value of the Numeric Field is negative.

o UNICODE Alpha Field from Literal Value or NATIONAL Alpha Field from Literal Value

  • Converts a numeric literal value to a 4-byte unsigned binary integer and stores it in the 1- character (4-byte) UNICODE/NATIONAL Alpha field.
  • The UNICODE/NATIONAL Alpha Field must be defined as a 1 character (4-byte internal length) field.
  • The numeric literal value must be a positive decimal value.
  • Em build should fail if the numeric literal value is negative.
  • Em build should fail if the character length of the UNICODE/NATIONAL Alpha Field is greater than 1 character.
  • An Overflow error should occur at runtime if the value of the Numeric Literal is greater than the maximum value that can be stored in a 4-byte unsigned binary integer. (Maybe this should be an Em build error instead)

o UNICODE Alpha Field to Numeric Field or NATIONAL Alpha Field to Numeric Field

  • Converts a 4-byte unsigned binary integer value that is stored in a 1-character (4-byte internal length) UNICODE/NATIONAL Alpha Field to an equivalent value stored in the specified Numeric Field.
  • The UNICODE/NATIONAL Alpha Field must be defined as a 1 character (4-byte internal length) field.
  • Em build should fail if the character length of the UNICODE/NATIONAL Alpha Field is greater than 1 character.
  • An Overflow error should occur at runtime if the value of the 4-byte unsigned binary integer is greater than the maximum value that can be stored in the specified Numeric Field.

Test Plan

  • convert valid numeric field unicode value to alpha/national and alpha/unicode
  • try to CNV BIN from numeric field into alpha/national and alpha/unicode that are not 1 character (Em build error)
  • try to CNV BIN from numeric field into alpha/national and alpha/unicode from invalid numerics (negative, >=4294967296)
  • convert valid literal unicode value to alpha/national and alpha/unicode
  • try to CNV BIN from literal into alpha/national and alpha/unicode that are not 1 character (Em build error)
  • try to CNV BIN from literal into alpha/national and alpha/unicode from invalid numerics (negative, >=4294967296)

BUGS

  • Painted 1 character alpha/national field on image, displayed as 4 characters. alpha/unicode was ok
  • CNV BIN from negative literal does not generate compile time error, generates 'Invalid Sign' runtime error. Might not be actual bug, just different implementation?

-- JeanNeron - 2011-03-11

Edit | Attach | Watch | Print version | History: r11 | r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r2 - 2011-03-11 - JeanNeron
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback