logo search
mat_mod

Объявление функции

functionbyte_to_int(alpha:byte)return integer is

variableresult:integer :=0;

begin

for n in 0 to 7 loop

result :=result*2 +bit'pos(alpha(n));

end loop;

returnresult;

endbyte_to_int;

Вызовфункции

process

variabledata:byte;

begin

byte_to_int(data);

end process;