arrays_0.bmx 531 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. SuperStrict
  2. Framework BRL.Standardio
  3. Local a1:Int[] = [1,2,3,4,5,6,7,8,9,10]
  4. Local b1:Int[10]
  5. Local c1:Int[2,5]
  6. For Local i:Int = 0 Until a1.length
  7. b1[i] = a1[i]
  8. c1[i/5,i Mod 5] = a1[i]
  9. Next
  10. Local s:String = "b1 = ["
  11. For Local i:Int = 0 Until a1.length
  12. If i Then
  13. s :+ ","
  14. End If
  15. s :+ b1[i]
  16. Next
  17. Print s + "]"
  18. s = "c1 = ["
  19. Local n:Int
  20. For Local x:Int = 0 Until 2
  21. For Local y:Int = 0 Until 5
  22. If n Then
  23. s :+ ","
  24. End If
  25. n :+ 1
  26. s:+ c1[x,y]
  27. Next
  28. Next
  29. Print s + "]"