Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

arrays without compile-time bounds aren't shown at all #32

Open
pgbovine opened this issue Feb 1, 2017 · 3 comments
Open

arrays without compile-time bounds aren't shown at all #32

pgbovine opened this issue Feb 1, 2017 · 3 comments
Labels

Comments

@pgbovine
Copy link

pgbovine commented Feb 1, 2017

x doesn't show up here since its bounds don't seem to be picked up at compile-time ...

const int DIM1 = 3;
const int DIM2 = 4;

void fint(int param[DIM1][DIM2]) {
  return;
}

int main() {
  int x[DIM1][DIM2];
  int i, j;
  for (i = 0; i < DIM1; i++)
    for(j = 0; j < DIM2; j++)
      x[i][j] = i+j*i;
  fint(x);
  return 0;
}
@pgbovine
Copy link
Author

pgbovine commented Feb 3, 2017

I think in general, arrays without compile-time bounds aren't rendered; not just multi-dimensional

int main() {
  int x = 42;
  int arr[x];
  return 0;
}

@pgbovine pgbovine changed the title multi-dimensional arrays without compile-time bounds aren't shown at all arrays without compile-time bounds aren't shown at all Feb 3, 2017
@pgbovine
Copy link
Author

another example of a variable-length array

int foo() {
  int x = 13;
  int y[x]; // <-- not shown in visualizer
  y[0] = 42; // <-- not shown in visualizer
  return 0;
}

int main() {
  foo();
  foo();
}

@pgbovine
Copy link
Author

pgbovine commented Nov 9, 2019

@pythontutor-dev pythontutor-dev transferred this issue from another repository Jun 28, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants