Skip to content

Missing Pointers and Arrays #11

@jacoblarkin

Description

@jacoblarkin

Add following to compiler

  1. declare pointers (e.g., int*x;)
  2. address operator (e.g., x = &y;)
  3. dereference operator (e.g., int z = *x;)
  4. declare arrays (e.g., int a[3] = {1, 2, 3};)
  5. subscript operator (e.g., b = a[1]; a[2] = c;)
  6. pointer arithmetic (e.g., x++; ++x; x + 1;)
  7. Array to pointer decay (e.g., assert(a + 2 == a[2]); x = a + 1; z = *a;)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions