View previous topic :: View next topic
|
Author |
Message |
small_world
New User
Joined: 22 Jul 2005 Posts: 24 Location: pune
|
|
|
|
HI All,
I have to insert a value 'D' stored in INSTITUTE in one of the variales: namea,nameb,namec,named,namee,namef. Before that i have to check whether the variables are empy or not.If there is any other logic other than if-else,Please share with me.thank You
if namea = spaces
move INSTITUTE to namea
else if nameb = spaces
move INSTITUTE to nameb
else if namec = spaces
move INSTITUTE to namec
else if named = spaces
move INSTITUTE to named
else if namee = spaces
move INSTITUTE to namee
end if
end if
end if
end if
end if |
|
Back to top |
|
|
Jerry
New User
Joined: 16 Sep 2005 Posts: 42
|
|
|
|
I think using evaluate would make it look better, though it is not a different logic.
Correct me if I am wrong. |
|
Back to top |
|
|
shivani_tech Warnings : 2 New User
Joined: 08 Jan 2006 Posts: 22 Location: UNITED KINGDOM
|
|
|
|
jerry is right it is one of the major aspect of vs-cobolii to use evaluate case statements rather than nested ifs |
|
Back to top |
|
|
|