Advertisement
Guest User

PacScript Sample

a guest
Feb 9th, 2017
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1.  
  2. Function TestFunction(ByVal IntInput As Integer) As Integer
  3.  
  4. Dim IntCounter1 As Integer = 42
  5. Dim IntCounter As Integer
  6. Dim PosTest As Position = P(1.2, 4.3, 4.5) 'the "," should be displayed normal, but without "," in Suffix 1 the number is not detected
  7.  
  8. For IntCounter = 1 To (IntCounter1 + 3) 'the "1" in IntCounter1 should be no number
  9. If (IntCounter = 13) Then
  10. Exit For '"For" should be not used as open folding
  11. End If
  12. Next IntCounter
  13.  
  14. IntNumber = 42
  15. SngNumber = 1.3
  16. SngNumber = 1,3 '"," should be not highlighted and stay black
  17. IntNumberHex1 = &H3220 'working
  18. IntNumberHex2 = &H3220AF3B 'not working
  19. IntNumberBin1 = &B1001001
  20. IntNumberBin1 = &B1031001 'should be no number because of the "3" inside
  21.  
  22. 'comment
  23. Rem Comment
  24. Call Remove '"Remove" should be not displayed as comment
  25.  
  26. LetZ PosCarrier = PosZ(PosPart)
  27.  
  28. SngInternal = (PosZ(PosPart) + PosZ(PosCarrier)) 'first "PosZ" is not detected
  29.  
  30. Select Case IntCounter
  31. Case 1
  32. Case 13
  33. Case Else '"Else" should be not used as open folding
  34. End Select
  35.  
  36. If (IntCounter = 42) Then
  37. Exit Function '"Function" should be not used as open folding
  38. Else
  39. IntCounter = 47
  40. End If
  41.  
  42. IntReturn = ShowDebug(12, "show debug1 as test", "two, three")
  43.  
  44. TestFunction = IntCounter
  45.  
  46. End Function
  47.  
  48.  
  49. Sub TestSub(ByRef IntOutput As Integer)
  50.  
  51. Dim SngInternal As Single
  52.  
  53. If (IO[IntOutput] = On) Then '"IO" should be shown as in the next line
  54. Reset IO[IntOutput]
  55. Else
  56. Set IO[IntOutput]
  57. Exit Sub '"Sub" should be not used as open folding
  58. End If
  59. Wait (ArrayInput(IntSegment - 1, IntPosition - 1) = On), IntTimeout '"On" should be displayed like in line 41
  60. Wait (IO[Input] = On), IntTimeout '"IO" should be detected
  61.  
  62. If (IntTest = False) Then
  63. IntReturn = True
  64. Else
  65. IntReturn = False
  66. End If
  67.  
  68. If (TestFunction() = False) Then '"False" should be displayed as keyword
  69. IntReturn = True
  70. Else
  71. IntReturn = False
  72. End If
  73.  
  74. If (IntTest = False) Then
  75. IntReturn = True
  76. Else
  77. IntReturn = False
  78. End If
  79.  
  80. SngInternal = 42.123
  81.  
  82. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement