I like this access type example

This is a discussion on I like this access type example within the vhdl forums in Programming Languages category; 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;...

Go Back   Application Development Forum > Programming Languages > vhdl

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-07-2008, 12:09 AM
James Unterburger
Guest
 
Default I like this access type example

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;
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 03:05 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.