Top Prev Next Up Down

Hexadecimal support

function CodePoint2Hex8String(v :CodePoint) return String ;
function Character2Hex8String(v :Character) return String ;
function CodePoint2Hex8CFix(v :CodePoint) return CFix ;
function Character2Hex8CFix(v :Character) return CFix ;
function To_Hex8String(v :Integer) return String ;
function To_Hex8CFix(v :Integer) return CFix ;
function Hex2Integer(s:CFix;padding:CFix:=CFix_Space) return Integer ;
function Hex2Integer(s:String;padding:String:=” ”) return Integer ;
function Hex2Integer(s:CVar;padding:CFix:=CFix_Space) return Integer ;

Examples:

[1] CodePoint2Hex8String(CodePoint'Val(16#39#))
  result: ______39
  CodePoint2Hex8String – convert to String with 8 hexadecimal digits and ‘_‘ as padding
[2] Character2Hex8String('8')
  result: ______38
  Character2Hex8String – convert to String with 8 hexadecimal digits and ‘_‘ as padding
[3] (No example) CodePoint2Hex8CFix – convert to CFix with 8 hexadecimal digits and ‘_‘ as padding
[4] (No example) Character2Hex8CFix – convert to CFix with 8 hexadecimal digits and ‘_‘ as padding
[5] To_Hex8String(16#37#)
  result: ______37
  To_Hex8String – convert to String with 8 hexadecimal digits. The second parameter defines possible filler characters. Default is space.
[6] To_Hex8String(16#37#)
  result: ______37
  (see above)
[7] To_Hex8String(-1)
  result: FFFFFFFF
  (see above)
[8] To_Hex8String(-3)
  result: FFFFFFFD
  (see above)
[9] (No example) To_Hex8CFix – convert to CFix with 8 hexadecimal digits. The second parameter defines possible filler characters. Default is space.
[10] Integer'Image(Hex2Integer("31"))
  result: 49
  Hex2Integer – convert to an Integer. The second parameter defines possible filler characters. Default is space. By giving second parameter as an empty string is interpreted as no filler or pad in the value is allowed
[11] Integer'Image(Hex2Integer("32 33"))
  result: 12851
  (see above)
[12] Integer'Image(Hex2Integer("34:35:36",":"))
  result: 3421494
  (see above)
[13] Integer'Image(Hex2Integer("FFFFFFFF"))
  result: -1
  (see above)