Advertisement
James1337

Preprocessor Test

Dec 28th, 2013
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.47 KB | None | 0 0
  1. #NoTrayIcon
  2.  
  3. #define True Random(0, 1, 1)
  4. #define f(x) ((x)^2)
  5.  
  6. ConsoleWrite("Hello World from AutoIt!" & @CRLF)
  7.  
  8. $a = 42
  9. $A = 1337
  10. ConsoleWrite($a & @CRLF) ; 42
  11. ConsoleWrite(True & @CRLF)
  12. ConsoleWrite(f(2) & @CRLF)
  13.  
  14. Type Vector
  15.     int x
  16.     int y
  17.     int z
  18. EndType
  19.  
  20. $vec = new Vector()
  21. $vec.x = $A
  22. ConsoleWrite($vec.x & @CRLF)
  23.  
  24. $x = Test()
  25. For $i = 0 To ยงx-1 ; = UBound($x)-1
  26.     ConsoleWrite($x[$i] & @CRLF)
  27. Next
  28.  
  29. Func Test()
  30.     Return [0, 1, 2, 3, 4] ; \o/
  31. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement