Re: [Vala] length method
- From: Kris Thomsen <lakristho gmail com>
- To: Luca Dionisi <luca dionisi gmail com>
- Cc: vala-list gnome org
- Subject: Re: [Vala] length method
- Date: Wed, 30 Mar 2011 10:18:33 +0200
ooh, nevermind...
I just wrote:
stdout.printf("%d\n", (int)"Hej".length);
Thank you :)
// Kris
2011/3/30 Kris Thomsen <lakristho gmail com>
Luca, this gives me following build error:
opgSix.vala:28.25-28.36: error: Argument 2: Cannot convert from `long' to
`int'
stdout.printf("%d\n", "Hej".length);
// Kris
2011/3/30 Luca Dionisi <luca dionisi gmail com>
stdout.printf("%d\n", "Hej".length);
On Wed, Mar 30, 2011 at 10:07 AM, Kris Thomsen <lakristho gmail com>
wrote:
Hi,
I'm new to Vala (have developed a bit in C# and learning it at school).
I'm trying to get the length of a string with this code:
public static void main(string[] args) {
stdout.printf((string)"Hej".length);
}
And it builds fine, but gives me a Segmentation Error (Core dumped).
Can anybody help me to make this work correctly?
// Kris Thomsen
_______________________________________________
vala-list mailing list
vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list
_______________________________________________
vala-list mailing list
vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]