Skip to content

Instantly share code, notes, and snippets.

@frazras
Created February 2, 2014 12:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frazras/8767487 to your computer and use it in GitHub Desktop.
Save frazras/8767487 to your computer and use it in GitHub Desktop.
checks to see which event occurred first A or B
a_occured = false
b_occured = false
function event(source){
if(source==A){
if(b_occured==false){
a_occurred=true
}
}else{
if(a_occured==false){
b_occurred=true
}
}
}
if (a_occured==true){
print "A occurred first"
}
if (b_occured==true){
print "B occurred first"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment