diff options
| author | Paul Buetow <paul@buetow.org> | 2008-11-04 21:20:56 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-11-04 21:20:56 +0000 |
| commit | ff0828f06a1f317681c45402feda48bde592a076 (patch) | |
| tree | 7c94275d5ab8b140cd41659d567c09bdc7ca9f16 /tmp | |
| parent | 48cf82bfc6cd65cc95f7658582fc532602a85ac0 (diff) | |
array_new_size
array_new_copy
implemented
Diffstat (limited to 'tmp')
| -rw-r--r-- | tmp/test.fy | 8 | ||||
| -rw-r--r-- | tmp/test.out | 28 |
2 files changed, 14 insertions, 22 deletions
diff --git a/tmp/test.fy b/tmp/test.fy index 609f0c2..8fe78a1 100644 --- a/tmp/test.fy +++ b/tmp/test.fy @@ -1,8 +1,6 @@ #* - * Examples of how to use references + * Examples of how to use arrays *# -# Create a variable foo, and bar is a reference to foo -my foo = "foo"; -my bar = &foo; - +my foo = 1, bar = 2; +my arr = [foo bar]; diff --git a/tmp/test.out b/tmp/test.out index eae02b0..79fda72 100644 --- a/tmp/test.out +++ b/tmp/test.out @@ -1,20 +1,14 @@ #* - * Examples of how to use references + * Examples of how to use arrays *# -# Create a variable foo, and bar is a reference to foo -my foo = "foo"; -my bar = &foo; - -Token (id=00000, line=00006, pos=0003, type=TT_MY, val=my, ival=0, dval=0.000000, refs=1) -Token (id=00001, line=00006, pos=0007, type=TT_IDENT, val=foo, ival=0, dval=0.000000, refs=1) -Token (id=00002, line=00006, pos=0009, type=TT_ASSIGN, val==, ival=0, dval=0.000000, refs=1) -Token (id=00003, line=00006, pos=0010, type=TT_STRING, val=foo, ival=0, dval=0.000000, refs=1) -Token (id=00004, line=00006, pos=0012, type=TT_SEMICOLON, val=;, ival=0, dval=0.000000, refs=1) -Token (id=00005, line=00007, pos=0003, type=TT_MY, val=my, ival=0, dval=0.000000, refs=1) -Token (id=00006, line=00007, pos=0007, type=TT_IDENT, val=bar, ival=0, dval=0.000000, refs=1) -Token (id=00007, line=00007, pos=0009, type=TT_ASSIGN, val==, ival=0, dval=0.000000, refs=1) -Token (id=00008, line=00007, pos=0011, type=TT_AAND, val=&, ival=0, dval=0.000000, refs=1) -Token (id=00009, line=00007, pos=0014, type=TT_IDENT, val=foo, ival=0, dval=0.000000, refs=1) -Token (id=00010, line=00007, pos=0015, type=TT_SEMICOLON, val=;, ival=0, dval=0.000000, refs=1) -nyi: Interpret error in ./tmp/test.fy line 7 pos 14 near 'foo' (Fype @ ./src/core/interpret.c line 960) +my foo = 1, bar = 2; +Token (id=00000, line=00005, pos=0003, type=TT_MY, val=my, ival=0, dval=0.000000, refs=1) +Token (id=00001, line=00005, pos=0007, type=TT_IDENT, val=foo, ival=0, dval=0.000000, refs=1) +Token (id=00002, line=00005, pos=0009, type=TT_ASSIGN, val==, ival=0, dval=0.000000, refs=1) +Token (id=00003, line=00005, pos=0011, type=TT_INTEGER, val=1, ival=1, dval=0.000000, refs=1) +Token (id=00004, line=00005, pos=0012, type=TT_COMMA, val=,, ival=0, dval=0.000000, refs=1) +Token (id=00005, line=00005, pos=0016, type=TT_IDENT, val=bar, ival=0, dval=0.000000, refs=1) +Token (id=00006, line=00005, pos=0018, type=TT_ASSIGN, val==, ival=0, dval=0.000000, refs=1) +Token (id=00007, line=00005, pos=0020, type=TT_INTEGER, val=2, ival=2, dval=0.000000, refs=1) +Token (id=00008, line=00005, pos=0021, type=TT_SEMICOLON, val=;, ival=0, dval=0.000000, refs=1) |
