I like this access type example

Discussion in 'VHDL' started by James Unterburger, Aug 7, 2008.

  1. It doesn't really do a whole lot.


    entity e is
    end;

    architecture a of e is
    type ptr;
    type ptr is access ptr;
    begin
    process
    variable p : ptr;
    variable top : ptr;
    begin
    top := new ptr;
    p := top;
    for i in 1 to 100 loop
    p.all := new ptr;
    p := p.all;
    end loop;
    wait;
    end process;
    end;
     
    James Unterburger, Aug 7, 2008
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Howard
    Replies:
    2
    Views:
    551
    Michiel Salters
    Jul 4, 2003
  2. heyo
    Replies:
    3
    Views:
    1,407
    Dan Pop
    Apr 1, 2004
  3. pete
    Replies:
    4
    Views:
    1,027
    Dan Pop
    Apr 2, 2004
  4. Yevgen Muntyan

    #define ALLOCIT(Type) ((Type*) malloc (sizeof (Type)))

    Yevgen Muntyan, Feb 9, 2007, in forum: C Programming
    Replies:
    10
    Views:
    1,214
    Yevgen Muntyan
    Feb 13, 2007
  5. Patrick Kowalzick
    Replies:
    5
    Views:
    737
    Patrick Kowalzick
    Mar 14, 2006
  6. Diego Martins
    Replies:
    5
    Views:
    672
    Diego Martins
    Sep 5, 2006
  7. kj
    Replies:
    5
    Views:
    623
  8. Sam Roberts
    Replies:
    15
    Views:
    578
    Sam Roberts
    Feb 7, 2005
Loading...