Ti_Basic_Tutorials

Boolean Sample

Apr 30th, 2012
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. //A basic example of boolean algebra
  2. 0->D
  3. 1->A
  4. 3->B
  5. 5->C
  6. If A=1
  7. D+1->D
  8. If B=3
  9. D+7->D
  10. If C=5
  11. D-5->D
  12.  
  13. Could be written a lot like this
  14. D+(A=1)+7(B=3)-5(C=5)->D
  15. /////////////////////////////////////
  16. //If A equals 1, then (A=1) Returns a value of 1. Making it D + 1 +....
  17. //If B=3. Then it returns a value of one. Which is multiplied by 7. then added in line.
  18. //This can be used with any math operator, and can be used for some
  19. //very fun programming tricks, which I will get into later
  20. ////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment