Advertisement
Guest User

Untitled

a guest
Mar 28th, 2019
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.32 KB | None | 0 0
  1. test "sample" {
  2.   const Test = struct {
  3.       value: []i32
  4.   };
  5.  
  6.   var tests = []Test {
  7.       Test {.value=&[]i32{24, 2}},
  8.       Test {.value=&[]i32{12}},
  9.       Test {.value=&[]i32{6}},
  10.       Test {.value=&[]i32{3}},
  11.   };
  12.  
  13.   for (tests) |atest| {
  14.       atest.value[0] = 0;
  15.       warn("{}\n", atest.value[0]);
  16.   }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement