Another pointer question

Discussion in 'VHDL' started by Tricky, Aug 6, 2008.

  1. Tricky

    Tricky Guest

    If I point to some basic type, how can I set the value at the pointer?

    eg:

    type I_ptr is access integer;
    ..
    ..
    ..
    variable A : I_ptr
    ...
    A := new integer;

    A := 10; --does not work - complains that A is not an integer (rightly
    so);

    same with any new types that are discrete

    type A_t;
    type A_ptr is access A_t;

    type A_t is (X, Y, Z);
    ...
    variable S : A_ptr;
    ...
    S := new A_t;

    S := X; --same problem as with integer;

    Am I, as usually, trying to go outside the scope of VHDL?
    Tricky, Aug 6, 2008
    #1
    1. Advertising

  2. Tricky

    eko

    Joined:
    Apr 16, 2008
    Messages:
    12
    1. Advertising

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. Replies:
    10
    Views:
    695
    Chris Torek
    Feb 4, 2005
  2. jimjim
    Replies:
    16
    Views:
    835
    Jordan Abel
    Mar 28, 2006
  3. Christopher
    Replies:
    0
    Views:
    244
    Christopher
    Jan 28, 2009
  4. Replies:
    4
    Views:
    1,248
    Fred Zwarts
    Jul 2, 2009
  5. A
    Replies:
    7
    Views:
    632
Loading...

Share This Page