Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (var == true)
- doSomething();
- if (var == 1)
- doSomething(1);
- else if (var > 1 && var < 10)
- doSomething(2);
- else
- {
- validate(var);
- doSomething(var);
- }
- if ( a == b) {
- doSomething();
- }
- else {
- doSomething();
- }
- if(a==b)
- {
- doSomething();
- }
- if(a==b)
- doSomething();
- doSomethingElse();
- if(a==b)
- {
- doSomething();
- doSomethingElse();
- }
- if(something)
- DoOneThing();
- else
- DoItDifferently();
- if(something)
- DoOneThing();
- else
- DoItDifferently();
- AlwaysGetsCalled();
- if (cond1)
- {
- SomeOperation();
- Another();
- }
- elseif (cond2)
- {
- DoSomething();
- }
- else
- {
- DoNothing();
- DoAnother();
- }
- if (cond1)
- DoFirst();
- elseif (cond2)
- DoSecond();
- else
- DoElse();
- foreach (var s as Something)
- if (s == someCondition)
- yield return SomeMethod(s);
- if (var == 1)
- doSomething();
- doSomethingElse();
- if (var == 1)
- doSomething();
- doSomethingExtra();
- doSomethingElse();
- If A == true
- FunctA();
- If B == "Test"
- {
- FunctB();
- }
- If A == false {
- //calls and whatnot
- }
- //or
- If B == "BlaBla"
- {
- //calls and whatnot
- }
- //or
- If C == B
- {
- //calls and whatnot
- }
- if (aString) free(aString);
- do_something if (a == b)
- if (a == b)
- do_something
- do_something_else
- end
- if (a == b)
- DoSomething();
- DoSomethingElse(); <-- outside if statement
- if (a == b) DoSomething();
- var c = (a == b) ? DoSomething() : DoSomethingElse();
- var c = (a == b)
- ? AReallyReallyLongFunctionName()
- : AnotherReallyReallyLongFunctionOrStatement();
- if (condition) {
- statements;
- }
- if (condition) {
- statements;
- } else {
- statements;
- }
- if (condition) {
- statements;
- } else if (condition) {
- statements;
- } else {
- statements;
- }
- if (var == true)
- { doSomething(); }
- if (cond)
- {
- //statement
- }
- if (i != 0)
- bar(i);
- foo(i);
- if(!ok)return;
- do();
- that();
- thing();
- do_something if condition;
- do_something unless condition;
- sub test{
- my($self,@args) = @_;
- return undef unless defined $self;
- # rest of code goes here
- }
Add Comment
Please, Sign In to add comment