Belinda Code

Date: Tue, 10 Jul 2001 10:07:12 -0400

Belinda A Gunn wrote:

Yong,

You are correct my changes did increase lines of code by 5 and increase ND from 1 to 2; However, the purpose of your action item was to rewrite your if statement for better readability. This meant that some code needed to be expanded so that it is easier to understand.

For instance, your correct that you only call ys_unlock_dialog twice in the following lines,

if( MODIFY && (yy_rtn == TRUE))
{
...ys_unlock_dialog(…MODIFY);
}
else
{
...ys_unlock_dialog(…VIEW);
}
However, it is not true that “one is for view action, the other for Modify action”… What your code really implies is that you unlock when action is MODIFY, unlock when action is VIEW, AND unlock when yy_rtn is false. I called ys_unlock 3 times so that you can clearly see all the
cases when ys_unlock is called ….

I expanded the if statement as follows:
if (yy_rtn == TRUE)
{
...if (MODIFY)
...{
......ys_….unlock
...}
...else (VIEW)
...{
......ys…..unlock
...}
}
else (yy_rtn == FALSE)
{
...ys_….unlock
}

bgunn