AnsweredAssumed Answered

vrf Dead Code

Question asked by jcmartin on Nov 18, 2001
To develop a VEE program to find by the "name" where a function is called is
not enough. Take into account that there are "formula" boxes and "Call"
boxes that could be feed them with the name of the function that it is
called. This name can be calculated programmatically and in some cases is
obtained by adding parts of it until it is completed.

For example. Imagine 3 functions called "port1", "port2" and "port3" that
are designed to communicate to ports 1, 2 and 3. Depending on the operator
input 1, 2 or 3, the name of the function is calculated by means of
"port"+"operator input". Of course, all are possibly called, however, no
"port1" string is found in the vee file apart of the function name itself.

In any case, to find the string of the function name in the vee file it is
better than nothing.

The best way could be the profiler. However you have to be sure that all
possible threads and options have been executed, which it is not so easy if
the vee is complex. If the vee file es easy, then you probably know wholly
the program and in that case you can go directly to the function and remove
it.

In some cases and when the dead code is not very important (maybe 2 or 3% of
the code), it is better to do nothing. You know:
- Does it function?
- Yes
- Don't touch it

Regards,


-----Mensaje original-----
De: Shaw, Edward [mailto:eshaw@comtechefdata.com]
Enviado el: viernes 16 de noviembre de 2001 16:52
Para: vrf reflector
Asunto: RE: vrf Dead Code



I was looking for some way to find dead code as well. I've inherited some
fairly large programs with more than 100 functions. This one particularly
troubling program will occasionally give me various "red box of death" (VEE
serious errors). One thing I thought was causing it was a sequencing problem
or some function just hanging out in space.

To find a function I have to show the Program explorer and highlight the
function, right click to execute a "called by". Then when the search box
pops up I click on each one and see that it is properly sequenced in the
program window. It's kind of tedious when you have many functions.

-----Original Message-----
From: Drago, William @ NARDAEAST [ mailto:William.Drago@L-3com.com
<mailto:William.Drago@L-3com.com> ]
Sent: Friday, November 16, 2001 8:18 AM
To: vrf reflector
Subject: RE: vrf Dead Code


Dead code is functions and variables that are never used. You may have
written a function to do some particular task, then abandoned it for a
better approach. The function still exists in your program but it is never
used.

Bill Drago
Test Engineer
L3 Communications - Narda Microwave East
435 Moreland Road
Hauppauge, NY 11788
William.Drago@L-3com.com
631-231-1700 Ext. 572
FAX 631-231-1480 

> -----Original Message-----
> From: Bruce Denis [ mailto:bdenis@wallindustries.com
<mailto:bdenis@wallindustries.com> ]
> Sent: Friday, November 16, 2001 9:48 AM
> To: vrf reflector
> Subject: RE: vrf Dead Code
>
>
> beginner question: what is dead code?
>
> -----Original Message-----
> From: owner-vrf@lvld.agilent.com [ mailto:owner-vrf@lvld.agilent.com
<mailto:owner-vrf@lvld.agilent.com> ]On
> Behalf Of Drago, William @ NARDAEAST
> Sent: Thursday, November 15, 2001 11:58 AM
> To: 'Vee Reflector'
> Subject: vrf Dead Code
>
>
> Hi,
>
> Has anyone written a utility to find dead code in VEE programs?
>
> Bill Drago
> Test Engineer
> L3 Communications - Narda Microwave East
> 435 Moreland Road
> Hauppauge, NY 11788
> William.Drago@L-3com.com
> 631-231-1700 Ext. 572
> FAX 631-231-1480
>
> ---------------------------------------------------------------------
> This is the "vrf" maillist, managed by Majordomo.  To send messages to
> this maillist, just email to "vrf@lvld.agilent.com". 
> Subscriptions and
> unsubscriptions are done through the address
> "vrf-request@lvld.agilent.com".
> If you need details, just send a message containing the text "help"
> to "vrf-request@lvld.agilent.com".
> ---------------------------------------------------------------------
>
>
> ---------------------------------------------------------------------
> This is the "vrf" maillist, managed by Majordomo.  To send messages to
> this maillist, just email to "vrf@lvld.agilent.com". 
> Subscriptions and
> unsubscriptions are done through the address
> "vrf-request@lvld.agilent.com".
> If you need details, just send a message containing the text "help"
> to "vrf-request@lvld.agilent.com".
> ---------------------------------------------------------------------
>
---------------------------------------------------------------------
This is the "vrf" maillist, managed by Majordomo.  To send messages to
this maillist, just email to "vrf@lvld.agilent.com".  Subscriptions and
unsubscriptions are done through the address "vrf-request@lvld.agilent.com".

If you need details, just send a message containing the text "help"
to "vrf-request@lvld.agilent.com".
---------------------------------------------------------------------

---------------------------------------------------------------------
This is the "vrf" maillist, managed by Majordomo.  To send messages to
this maillist, just email to "vrf@lvld.agilent.com".  Subscriptions and
unsubscriptions are done through the address "vrf-request@lvld.agilent.com".
If you need details, just send a message containing the text "help"
to "vrf-request@lvld.agilent.com".
---------------------------------------------------------------------

Outcomes