Re: [Vala] Array Property Length Not Matching What I Expect ‏

Sorry, this is my last attempt at using hotmail before I switch to my
gmail account.

and the code snippet:

public int main()
        string[] test_array, test2;
        TestClass tc;
        ulong len1, len2;
        test_array = new string[100];
        test_array[0] = "hello world";
        tc = new TestClass(test_array);
        test2 = tc.rawr;
        len1 = tc.rawr.length;
        len2 = test2.length;

        stdout.printf("\t\t%lu\n", len1);
        stdout.printf("string[].length:\t\t\t%lu\n", len2);
        return (int)(len1 != len2);

public class TestClass
        string[] inside_rawr;
        public string[] rawr { get { return inside_rawr; } }
        public TestClass(string[] r)
                inside_rawr = r;

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]