Project

General

Profile

Feature #191

Unused local variables & commented code

Added by Wil van Antwerpen over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Start date:
01/11/2023
Due date:
% Done:

0%


Description


Procedure DoAsk
    Integer iResponse

//    Move (YesNo_Box("I ask if...", "", MB_DEFBUTTON2)) to iResponse
//    If (iResponse = "MBR_YES") Begin
    If (YesNo_Box("I ask if...", "", MB_DEFBUTTON2) = "MBR_YES") Begin
    End
End_Procedure

In this case "iResponse" gets deleted. In case you uncomment the code you are going to get compiler errors.

One can say... comment the variable instead of delete it!
Maybe in this example it is easy, but in situations like "Integer iResponse1 iResponse2" it gets complicated.

I think it is fine as it is now, but I also think it was worth telling about.

From:
https://support.dataaccess.com/Forums/showthread.php?69408-DFRefactor-3-2-1-0-Unused-local-variables-amp-commented-code

Also available in: Atom PDF