!! Remove variables !! 
Author Message
 !! Remove variables !!

Hi there!

I'd like to do this:
Remove all the variables I have declared but have not used anywhere in VB
app.

But I couldn't the Method.

Thanx any help!!



Fri, 23 Jan 2004 15:03:32 GMT  
 !! Remove variables !!
The only way I know of doing that is to USE JAVA! -lol


Fri, 23 Jan 2004 20:02:14 GMT  
 !! Remove variables !!
There are basically two ways I can think of to achieve this, other than
poring over the code.

1)  Write, buy or otherwise obtain a program which will check declarations
against the used variables and list, possibly remove, the redundant
declarations, i.e. a program to read the code (generally called
cross-reference utilities, or something similar).
2)  Make sure you have Option Explicit turned on, delete all variable
definitions, and then let the compiler pick out the undeclared variables one
by one.

If you choose the second method, I wish you joy ...

Incidentally, if this is actually a major problem for you, consider changing
your style to use smaller routines, calling subroutines or functions to do
the bulk of the work.  A code segment which is small enough to see more or
less all on-screen at once is easy enough to grasp in one go and check for
this sort of thing.  The called procedure is a wonderful tool for reducing
the complexity of a piece of code, especially if things are well-named (which
means names which makes obvious the nature of the thing named, not short -
not necessarily long, either, just clear).

Quote:

> Hi there!

> I'd like to do this:
> Remove all the variables I have declared but have not used anywhere in VB
> app.

> But I couldn't the Method.

> Thanx any help!!



Fri, 23 Jan 2004 21:53:55 GMT  
 !! Remove variables !!
Search for the variable name with the right scope, if you
only find it once(the declaration), you can remove the
variable.
Jaap.
Quote:
>-----Original Message-----
>Hi there!

>I'd like to do this:
>Remove all the variables I have declared but have not
used anywhere in VB
>app.

>But I couldn't the Method.

>Thanx any help!!

>.



Mon, 26 Jan 2004 22:35:33 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. (Q) Removing spaces at end of variable (MS Qbasic)

2. removing multiple space characters from a string variable

3. How to remove spaces from a variable?

4. Variables and ADD/Remove List

5. !!! Remove Variables !!!

6. Attachments.remove is not removing attachment

7. Remove Datasource (remove all merge info)

8. Removing entries from Add/Remove list in control panel

9. print variable, variable, variable etc

10. Referencing Global Variable from a variable

11. Error msg: Object variable or With block variable not set

12. Expanding a variable or referencing a field within variable

 

 
Powered by phpBB® Forum Software