On 25-Mar-01 WM wrote: > I am writing a program like this: ... > subtype Binary_Number is Integer range 0..1; --define data type ... > function Bin_To_Dec(bin:Binary_Number) return Integer is ... > Answer := Answer + a_bin_num(Bin(J))*(2**(J-1)); ... > It gives me a lot of errors... really don't know what's wrong... > Please give some hints, thanks! The first error message I get points to Line 16, Character 39 and says: "array type required in indexed component". The "indexed component" is "Bin(J)". "Bin" is not an array, it�s an integer (0 or 1). The poor naming is the reason of the problems: Rename every occurrence of "Binary_Number" to "Binary_Digit_Type" and every occurrence of A_Bin_Num to "Binary_Number_Type" and then look at the function declaration: Did You really want what is written there? Wilhelm