Announcement

Collapse
No announcement yet.

return rule question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • return rule question

    I have a number of if's that call sub routines similar to ...

    if(long==1){golong();}

    if(short==1){goshort();}
    etc.... next 300 lines of code

    return;


    golong();{
    buy a long;
    }

    goshort();{
    sell a short;
    }

    My question is, Can I avoid the execution of the if(short==1) statement (and 300 other lines of code) if the if(long==1) statement is executed? Do I just put a return; on the end of the golong() subroutine?

  • #2
    if(long==1){
    golong();
    } else if(short==1){
    goshort();
    } else {
    300 lines of code
    }

    is this what you mean?
    Garth

    Comment

    Working...
    X