How to access symbol when its dimensionality is not known till runtime (About to giveup)

Discussion in 'C Programming' started by Christopher M. Lusardi, Dec 18, 2003.

  1. Hi,

    Is it possible to access the actual value of a symbol at runtime when
    you don't know it's definition till then. The symbol can be a variable,
    a 1 dimensional array, a 2 dimensional array, or a 3 dimensional array?

    If this is possible can you post example code for each case.

    (Background: The compiler complains if I just use pointers with nested "if"
    statements complaining 3 of the 4 assignments are not defined [identifier
    is undefined]. I'm using this code on SGI machines and object code doesn't
    contain dimensionality information, only the number of elements [obtained
    through the system command dwarfdump on the object code].)

    Thank you,
    Christopher Lusardi
     
    Christopher M. Lusardi, Dec 18, 2003
    #1
    1. Advertising

  2. Re: How to access symbol when its dimensionality is not known tillruntime (About to giveup)

    Christopher M. Lusardi wrote:
    > Hi,
    >
    > Is it possible to access the actual value of a symbol at runtime when
    > you don't know it's definition till then. The symbol can be a variable,
    > a 1 dimensional array, a 2 dimensional array, or a 3 dimensional array?
    >
    > If this is possible can you post example code for each case.
    >
    > (Background: The compiler complains if I just use pointers with nested "if"
    > statements complaining 3 of the 4 assignments are not defined [identifier
    > is undefined]. I'm using this code on SGI machines and object code doesn't
    > contain dimensionality information, only the number of elements [obtained
    > through the system command dwarfdump on the object code].)


    Is this C or C++ ?

    If you are using C, there are other ways to do what (I think) you're
    trying to do.

    Don't let us guess, what exactly are you trying to do ? There may be a
    standards compliant way to do it.
     
    Gianni Mariani, Dec 18, 2003
    #2
    1. Advertising

  3. Re: How to access symbol when its dimensionality is not known tillruntime (About to giveup)

    Christopher M. Lusardi wrote:
    > Hi,
    >
    > Is it possible to access the actual value of a symbol at runtime when
    > you don't know it's definition till then. The symbol can be a variable,
    > a 1 dimensional array, a 2 dimensional array, or a 3 dimensional array?
    >
    > If this is possible can you post example code for each case.
    >
    > (Background: The compiler complains if I just use pointers with nested "if"
    > statements complaining 3 of the 4 assignments are not defined [identifier
    > is undefined]. I'm using this code on SGI machines and object code doesn't
    > contain dimensionality information, only the number of elements [obtained
    > through the system command dwarfdump on the object code].)
    >
    > Thank you,
    > Christopher Lusardi


    This a FAQ:
    http://www.parashift.com/c -faq-lite/freestore-mgmt.html


    --
    Thomas Matthews

    C++ newsgroup welcome message:
    http://www.slack.net/~shiva/welcome.txt
    C++ Faq: http://www.parashift.com/c -faq-lite
    C Faq: http://www.eskimo.com/~scs/c-faq/top.html
    alt.comp.lang.learn.c-c++ faq:
    http://www.raos.demon.uk/acllc-c /faq.html
    Other sites:
    http://www.josuttis.com -- C++ STL Library book
     
    Thomas Matthews, Dec 18, 2003
    #3
    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. Christopher M. Lusardi
    Replies:
    2
    Views:
    290
    Thomas Matthews
    Dec 18, 2003
  2. John Friedland
    Replies:
    18
    Views:
    542
    Adam Warner
    Jul 12, 2006
  3. John Friedland
    Replies:
    11
    Views:
    513
    Nicholas Howe
    Jul 14, 2006
  4. Replies:
    4
    Views:
    397
  5. thunk
    Replies:
    1
    Views:
    315
    thunk
    Mar 30, 2010
Loading...

Share This Page