Skip to content

Instantly share code, notes, and snippets.

@ben-albrecht
Last active January 22, 2018 17:36
Show Gist options
  • Select an option

  • Save ben-albrecht/dc9af9f2b6543f922b8e7c43d3fde213 to your computer and use it in GitHub Desktop.

Select an option

Save ben-albrecht/dc9af9f2b6543f922b8e7c43d3fde213 to your computer and use it in GitHub Desktop.
var V = [0,0,0];
var T = (1,2,3);
// Works
V = T;
writeln(V);
V = 0;
// Works
for (v, t) in zip(V, T) {
v = t;
}
writeln(V);
V = 0;
// $CHPL_HOME/modules/internal/ChapelTuple.chpl:231: In iterator 'these':
// $CHPL_HOME/modules/internal/ChapelTuple.chpl:234: error: tuple indexing expression is not of integral type
forall (v, t) in zip(V, T) {
v = t;
}
writeln(V);
V = 0;
// tuple-array.chpl:28: error: unresolved access of 'range(int(64),bounded,false)' by '(1)'
forall (t, v) in zip(T, V) {
v = t;
}
writeln(V);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment