Re: [Vala] Incompatible operand
- From: Luca Bruno <lethalman88 gmail com>
- To: Shawn Ferris <shawn ferris gmail com>
- Cc: Vala-list <Vala-list gnome org>
- Subject: Re: [Vala] Incompatible operand
- Date: Wed, 2 Nov 2011 16:13:43 +0100
On Wed, Nov 2, 2011 at 5:46 AM, Shawn Ferris <shawn ferris gmail com> wrote:
Hey All --
Is there another operand for the following, or is this a bug?
uchar[] foo = new char[100];
int len = 0;
int final_len = 0;
some_method(foo,out len);
some_method2(foo+len, out final_len);
The foo+len yields the error:
x.vala:90.25-90.52: error: Incompatible operand
However, if I replace the variable length with a hardcoded one, it's
accepted:
some_method2(foo+16, out final_len);
Thanks for the help!
Arithmetic is done with pointers: uchar *bar = foo; then bar+16.
--
www.debian.org - The Universal Operating System
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]