Skip to content

Commit e8c5dd4

Browse files
schlupathewilsonator
authored andcommitted
Update ctod.dd
Add simpler example for dynamic array extension.
1 parent 0648d6c commit e8c5dd4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

articles/ctod.dd

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,15 @@ array.length = array.length + 1;
325325
array[array.length - 1] = x;
326326
----------------------------
327327

328+
or simply:
329+
330+
----------------------------
331+
int[] array;
332+
int x;
333+
array ~= x;
334+
----------------------------
335+
336+
328337
<hr>$(COMMENT ============================================ )
329338
$(H2 $(LNAME2 strcat, String Concatenation))
330339

0 commit comments

Comments
 (0)