aboutsummaryrefslogtreecommitdiff
path: root/projects/12/Array.jack
diff options
context:
space:
mode:
Diffstat (limited to 'projects/12/Array.jack')
-rw-r--r--projects/12/Array.jack26
1 files changed, 0 insertions, 26 deletions
diff --git a/projects/12/Array.jack b/projects/12/Array.jack
deleted file mode 100644
index 343c25c..0000000
--- a/projects/12/Array.jack
+++ /dev/null
@@ -1,26 +0,0 @@
-// This file is part of www.nand2tetris.org
-// and the book "The Elements of Computing Systems"
-// by Nisan and Schocken, MIT Press.
-// File name: projects/12/Array.jack
-
-/**
- * Represents an array.
- * In the Jack language, arrays are instances of the Array class.
- * Once declared, the array entries can be accessed using the usual
- * syntax arr[i]. Each array entry can hold a primitive data type as
- * well as any object type. Different array entries can have different
- * data types.
- */
-class Array {
-
- /** Constructs a new Array of the given size. */
- function Array new(int size) {
- return Memory.alloc(size);
- }
-
- /** Disposes this array. */
- method void dispose() {
- do Memory.deAlloc(this);
- return;
- }
-}