I am looking for the cleanest way to impliment this code. So, I have come to you more experienced coders for more clearity. Below is a sample code which I am trying to make more effecient.
Is there an easier and more efficient way to declare this part of the code into "var", "Flag" or "Condition"?
For Example:
or
I am aware that both of these example are more than likely worng.
This way I can perform the code like the following:
or
Any help would be greatly appreciated.
Thanks,
PHP Code:
function preMain() {
setPriceStudy(true);
}
function main() {
var wT1 = My Study Parameters 1;
var XT1 = My Study Parameters 2;
var YT1 = My Study Parameters 3;
var zT1 = My Study Parameters 4;
if(wT1 > Yt1 && Xt1 > Zt1){
Then do the following...
}
if(wT1 < Yt1 && Xt1 < Zt1){
Then do the following...
}
}
PHP Code:
(wT1 > Yt1 && Xt1 > Zt1)
(wT1 < Yt1 && Xt1 < Zt1)
PHP Code:
vFlag = (wT1 > Yt1 && Xt1 > Zt1);
PHP Code:
var cOMB1 = (wT1 > Yt1 && Xt1 > Zt1);
This way I can perform the code like the following:
PHP Code:
if vFlag == true){
Then do the following...
}
PHP Code:
if cOMB1 == true){
Then do the following...
}
Thanks,
Comment