Hi,
The example as posted has some mistakes as already pointed out by jahonen. First of all, if you would like to assign a bit vector to the input and output signals, a vectors should be used of the type bit_vector instead of this single value bit. However, in modern VHDL coding bit and bit_vector are not used instead std_logic_vector, unsigned and signed are used for vectors and std_logic for single signals
The use of these constructs is illustrated in the following example
library ieee;
use ieee.std_logic_1164.all;
entity bcd_7seg is
port (
bcd : in std_logic_vector(3 downto 0);
seg : out std_logic_vector(6 downto 0)
);
end;
architecture rtl of bcd_7seg is
begin
process(bcd)
begin
seg <= (others=>'1');
case bcd is
when "0000" => -- 0
seg (5 downto 0) <= (others=> '0');
when "0001" => -- 1
seg(2 downto 1) <= (others=>'0');
when "0010" => -- 2
seg(1 downto 0)<=(others=>'0');
seg(6) <='0';
seg(4 downto 3)<=(others=>'0');
when "0011" => --3
seg(3 downto 0)<=(others=>'0');
seg(6) <= '0';
when "0100" => --4
seg(2 downto 1) <= (others=>'0');
seg(6 downto 5) <= (others=>'0');
when "0101" => --5
seg(0) <= '0';
seg(3 downto 2) <= (others=>'0');
seg(6 downto 5) <= (others=>'0');
when "0110" => --6
seg(6 downto 2) <= (others=>'0');
seg(0) <= '0';
when "0111"=> --7
seg(2 downto 0) <= (others=>'0');
when "1000" =>
seg(6 downto 0) <= (others=>'0');
when "1001" =>
seg(3 downto 0) <= (others=>'0');
seg(6 downto 5) <= (others=>'0');
when "1010" => --A
seg(2 downto 0) <= (others=>'0');
seg(6 downto 4) <= (others=>'0');
when "1011" => --B
seg(6 downto 2) <= (others=>'0');
when "1100" => --C
seg(5 downto 3) <= (others=>'0');
seg(0) <= '0';
when "1101" => --D
seg(4 downto 1) <= (others=>'0');
seg(6) <= '0';
when "1110" => --E
seg(6 downto 3) <= (others=>'0');
seg(0) <= '0';
when "1111" => --F
seg(6 downto 4) <= (others=>'0');
seg(0) <= '0';
when others => null;
end case;
end process;
end architecture;
This is fully working example which has been tested on a FPGA.
A free book is the VHDL-Cookbook
http://tams-www.informatik.uni-hamburg.de/vhdl/doc/cookbook/VHDL-Cookbook.pdf.This is not a very good book but it contains the syntax rules and should be used as a reference only.
Hope this helps
Johan