PC Review


Reply
Thread Tools Rate Thread

How can I obtain global variables pointers?

 
 
Gianco
Guest
Posts: n/a
 
      12th Sep 2003
Hello

I have a class that manages the setup of my application, I wrote it
because my application needs a lot of setup parameters (it makes
electrical measures on different input channels and each channel has
many parameters). To avoid the creation of a setup page with hundreds
of parameters (or more pages because the parameter types are not
always the same for each channel), I wrote a class that stores and
retrieves this parameters in the registry. It shows the defined
parameters sorted by group and by name in a form so the user can found
quickly the parameters that he wants to change. I want to store new
value of the parameter in the registry and in the variable used in the
program. So I would avoid to write code like this:

If (ParameterVoice = 1) Then
Variable1 = "new value"
elseif (ParameterVoice = 2) Then
Variable2 = "new value"
.......
elseif (ParameterVoice = 250) Then
Variable250 = "new value"
endif

I would save the pointer of the variable linked to each parameter in
an internal structure of this class when I define the parameter, then
store the new values of the variables when the user changes the
relative voices in the setup

The goal of this class is to be generic and reusable in future
projects, I hope this will be possible without write 250 IFs....

Can I do this?

Thanks
Gianco
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Global variables - again - sorry Dennis Microsoft Access Form Coding 6 22nd Feb 2010 01:27 PM
Global Variables/Session Variables =?Utf-8?B?ZGNoMw==?= Microsoft Outlook VBA Programming 2 31st May 2007 01:11 PM
Object Variables vs Pointers to Object Variables Jeremy S. Microsoft C# .NET 1 12th Sep 2005 09:06 AM
Global variables, reading variables from a file Andrew Cushen Microsoft Outlook VBA Programming 15 22nd Jan 2004 03:02 PM
Global variables on par with ASP's global.asa Wayne Microsoft ASP .NET 2 11th Nov 2003 10:58 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:56 PM.