Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. active proctype comparator() {
  2. bit a[8] = {1,0,1,0,1,1,1,1}
  3. bit b[8] = {1,0,1,0,1,1,1,0}
  4.  
  5. byte i
  6.  
  7. printf("%d%d%d%d%d%d%d%d\n", a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7])
  8. printf("%d%d%d%d%d%d%d%d\n", b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7])
  9.  
  10. for (i : 0 .. 7) {
  11. if
  12. :: (a[i] > b[i]) -> goto failed
  13. :: else -> skip
  14. fi
  15. }
  16.  
  17. printf("1\n")
  18. goto done
  19. failed:
  20. printf("0\n")
  21. done:
  22. skip
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement