Guest User

Untitled

a guest
Apr 8th, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /'soll:
  2. 111111111111111111111
  3. 000111000000000000001
  4. 000000000000000000001
  5. 000000000000000000001
  6. 000000000000000000001
  7. 000000000000000000001
  8. 000000000000000000001
  9. 000000000000000000001
  10. 000000000000000000001
  11. '/
  12.  
  13. Dim text As String
  14. Dim count As Integer
  15. Dim kollisionen2 () As Boolean
  16.  
  17. Open "level.col" For Binary As #1
  18.     Do
  19.         count = count + 1
  20.         Line Input #1 , text
  21.         ReDim Preserve kollisionen2 (Len (text) - 1 , 8) As Boolean
  22.        
  23.         For zaehler As Integer = 1 To Len (text)
  24.             If Mid (text , zaehler , 1) = "0" Then
  25.                 kollisionen2 (zaehler - 1 , count - 1) = FALSE
  26.             ElseIf Mid (text , zaehler , 1) = "1" Then
  27.                 kollisionen2 (zaehler - 1 , count - 1) = TRUE
  28.             EndIf
  29.         Next zaehler
  30.        
  31.         Open Cons For Output As #2
  32.             Print #2 , text
  33.         Close #2
  34.     Loop Until Eof (1)
  35. Close #1
  36.  
  37. /' ist = soll '/
  38.  
  39.  
  40. Dim text As String
  41. Dim count As Integer
  42. Dim kollisionen2 () As Boolean
  43.  
  44. Open "level.col" For Binary As #1
  45.     Do
  46.         count = count + 1
  47.         Line Input #1 , text
  48.         ReDim Preserve kollisionen2 (Len (text) - 1 , count) As Boolean
  49.        
  50.         For zaehler As Integer = 1 To Len (text)
  51.             If Mid (text , zaehler , 1) = "0" Then
  52.                 kollisionen2 (zaehler - 1 , count - 1) = FALSE
  53.             ElseIf Mid (text , zaehler , 1) = "1" Then
  54.                 kollisionen2 (zaehler - 1 , count - 1) = TRUE
  55.             EndIf
  56.         Next zaehler
  57.        
  58.         Open Cons For Output As #2
  59.             Print #2 , text
  60.         Close #2
  61.     Loop Until Eof (1)
  62. Close #1
  63.  
  64. /'ist:
  65. 101000000000000000000
  66. 000000000000000000000
  67. 000100000000000000000
  68. 000000000000000000000
  69. 001000000000000000000
  70. 000000000000001000000
  71. 000100000000000010000
  72. 000000000000000000100
  73. 000000000000000000001
  74. '/
Add Comment
Please, Sign In to add comment