Re: [Vala] printing int64 value to standard output
- From: Aaron <aaron fosslib net>
- To: vala-list gnome org
- Subject: Re: [Vala] printing int64 value to standard output
- Date: Tue, 15 May 2012 08:53:23 -0400
Just use string templates:
stdout.printf (@"$ts\n");
String templates will always give you the proper format.
Aaron
Quoting Sam Wilson <tecywiz121 hotmail com>:
On 12-05-15 06:54 AM, pancake wrote:
%lld is not portable. your code will not work on windows.
the portable way is:
void main() {
uint64 ts = 123;
stdout.printf ("%"+uint64.FORMAT_MODIFIER;+"d\n", ts);
}
That just looks horrible... Couldn't Vala just compile %lld into the
proper format on each platform?
Sam
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]