473,397 Members | 1,949 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

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

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
Nov 14 '05 #1
2 1474
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.

Nov 14 '05 #2
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-lit...tore-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

Nov 14 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Christopher M. Lusardi | last post by:
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,...
0
by: Frederick Noronha \(FN\) | last post by:
---------- Forwarded message ---------- Solutions to Everyday User Interface and Programming Problems O'Reilly Releases "Access Cookbook, Second Edition" Sebastopol, CA--Neither reference book...
9
by: | last post by:
Hi All, I have allready tried to ask a similar question , but got no answer until now. In the meantime, I found, that I cannot understand some thread-settings for the Main() function . If I use...
4
by: curious | last post by:
It will be great if some one can explain in detail about structure of process in memory...where is symbol table etc..located?
5
by: Lyle Fairfield | last post by:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/callnetfrcom.asp The Joy of Interoperability Sometimes a revolution in programming forces you to abandon all...
3
by: Lauren Wilson | last post by:
Hi folks, we have an Access 2003 app that is running just fine on several thousand computers all over North America. Recently, on ONE in particular, we suddenly started see a startup error,...
15
by: sparks | last post by:
We get more and more data done in excel and then they want it imported into access. The data is just stupid....values of 1 to 5 we get a lot of 0's ok that alright but 1-jan ? we get colums...
18
by: John Friedland | last post by:
My problem: I need to call (from C code) an arbitrary C library function, but I don't know until runtime what the function name is, how many parameters are required, and what the parameters are. I...
5
by: kp | last post by:
Hi, I am compiling on an AIX 5.1 box and my test machine is AIX 5.3. I run the foll. steps for compiling my test binary "test" /usr/vacpp/bin/xlC test.c -c -o test.o -I/home/jag/progs/include...
10
by: Les Desser | last post by:
In article <fcebdacd-2bd8-4d07-93a8-8b69d3452f3e@s50g2000hsb.googlegroups.com>, The Frog <Mr.Frog.to.you@googlemail.comMon, 14 Apr 2008 00:45:10 writes Thank you for that. It was very...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.