[Bug 608069] Tango standard library for D language of d1 specification
bugzilla at redhat.com
bugzilla at redhat.com
Sat Jul 24 20:25:27 UTC 2010
Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=608069
--- Comment #17 from MERCIER Jonathan <bioinfornatics at gmail.com> 2010-07-24 16:25:25 EDT ---
tango is not phobos
see this example:
module test;
import tango.stdc.stdio;
import tango.io.Console : Cout, Cerr;
import tango.io.Stdout;
import tango.text.convert.Format;
import tango.text.convert.Integer : format;
void main(){
uint a = 5;
uint b = 0;
char[1] tmp0;
char[1] tmp1;
//printf same in C
printf("hello, world\n");
//Cout same in C++
Cout("try divide ")(format(tmp0, a, "d"))(" by ")(format(tmp1, b,
"d")).newline;
//test
if (b == 0){
Cerr("Divide by zero!!").newline;
}
else{
Format("Result: {}\n", a/b);
Stdout.formatln ("Result: '{}'/'{}'='{}'", a, b, a/b);
}
}
--
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the package-review
mailing list