Re: [Vala] length method

I had to use %ld to make it work correctly :)

But thanks!

// Kris

2011/3/30 Luca Dionisi <luca dionisi gmail com>

On Wed, Mar 30, 2011 at 10:18 AM, Kris Thomsen <lakristho gmail com>
ooh, nevermind...

I just wrote:

stdout.printf("%d\n", (int)"Hej".length);

Better yet, use %l in place of %d.
So you don't need to cast a long into a int.
Have a look at "man printf"

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