[Vala] type MIN and MAX
- From: Alessandro Pellizzari <alex amiran it>
- To: Vala ML <vala-list gnome org>
- Subject: [Vala] type MIN and MAX
- Date: Wed, 05 Mar 2008 18:26:16 +0100
Hi all,
today I stumbled upon a strange behaviour. I would like to know if it is
expected or not:
using GLib;
public class Main : Object {
static int main (string[] args) {
stdout.printf ("uint.min => %i\n", uint.MIN);
stdout.printf ("uint.max => %i\n", uint.MAX);
stdout.printf ("ulong.min => %i\n", ulong.MIN);
stdout.printf ("ulong.max => %i\n", ulong.MAX);
stdout.printf ("uint32.min => %i\n", uint32.MIN);
stdout.printf ("uint32.max => %i\n", uint32.MAX);
stdout.printf ("int64.min => %i\n", int64.MIN);
stdout.printf ("int64.max => %i\n", int64.MAX);
stdout.printf ("uint64.min => %i\n", uint64.MIN);
stdout.printf ("uint64.max => %i\n", uint64.MAX);
}
}
This code gives:
uint.min => 0
uint.max => -1
ulong.min => 0
ulong.max => -1
uint32.min => 0
uint32.max => -1
int64.min => 0
int64.max => -1
uint64.min => 0
uint64.max => -1
The other values are OK and showing expected boundaries.
I am using vala 0.1.7
Thanks.
Bye.
--
Alessandro Pellizzari
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]