Start a conversation

We don’t understand some of the ADA custom type conversions Type Reset_Data_Type is (One, Two, Three, Four) was converted to Const Integer Reset_data_type_enum_integer_table[4]={3,6,11,15};Const Character Test_data_type_enum_image_table[11]= {“ONETWOTHREEFOUR”}

Ada provides ‘Image’ and ‘Value’ functions for every enumeration type, and so the compiler needs to build up a table of information that allows an internal enumeration value to be turned into a string, and vice-versa. The enum_integer_table and the enum_image_table are used for that purpose. If you want to suppress the generation of such a table, you can use Ada’s “Discard_Names” pragma. Having done that, then Ada code that uses ‘Image or ‘Value will no longer work as expected, and instead will use numeric literals for input and output.

Choose files or drag and drop files
Was this article helpful?
  1. MapuSoft

  2. Posted
  3. Updated