Nekit1234007 / cjass

Automatically exported from code.google.com/p/cjass
0 stars 0 forks source link

Multiple array declarations in one line #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. integer array a, b 
This makes a and array, but b not.
I dont know if this is willed but its bugged in the cj_print.j
Line 646: string array cj_sprintf_p, cj_sprintf_pc
2.
{{{
void foo() {
    integer array a, b
    a[0] = 1
    b[0] = 2
}
}}}
Pjass error, b is not an array.

What is the expected output? What do you see instead?
I guess it should result in 2 arrays. If not, fix the cJass libs.

What version of the product are you using? On what operating system?
1.4.2.31 - but I also noticed it in the older versions.

Original issue reported on code.google.com by erwgfifo...@gmail.com on 11 Aug 2011 at 12:34

GoogleCodeExporter commented 9 years ago
Sorry, it is old bug in printf (and old manual too?).

Legal syntax is:

integer a[], b[], c /*c isn't array*/
or
integer array a, array b

We're fix printf library in next stable release. You may too easy fix it.

Original comment by adi...@gmail.com on 11 Aug 2011 at 1:06

GoogleCodeExporter commented 9 years ago

Original comment by adi...@gmail.com on 11 Aug 2011 at 1:11