digitalmars.D - Something other than printf/writef?
- Dawid =?ISO-8859-2?Q?Ci=EA=BFarkiewicz?= (10/10) Oct 30 2004 I hate printf. It's type usafe, it likes to crash etc., etc.
- Lars Ivar Igesund (4/14) Oct 30 2004 You mention writef in your subject. D's writef (and writefln) is a
- Dawid =?ISO-8859-2?Q?Ci=EA=BFarkiewicz?= (5/7) Oct 30 2004 Right. But I still got to use those "%s" etc. things ...
- h3r3tic (5/12) Oct 30 2004 Nope, you don't have to.
- Ivan Senji (9/21) Oct 30 2004 Have you tried:
- teqDruid (2/12) Oct 30 2004
- Dawid =?ISO-8859-2?Q?Ci=EA=BFarkiewicz?= (5/6) Oct 31 2004 I'll try it - thanks,
I hate printf. It's type usafe, it likes to crash etc., etc. I wish I could just: char[] s; int i; file.scan(i).scan(s); file.write("bla ").write(i); and same with stdio. Can I? -- Dawid Ciężarkiewicz | arael jid: arael fov.pl
Oct 30 2004
You mention writef in your subject. D's writef (and writefln) is a typesafe version of printf. You find them in std.stdio. Lars Ivar Igesund Dawid Ciężarkiewicz wrote:I hate printf. It's type usafe, it likes to crash etc., etc. I wish I could just: char[] s; int i; file.scan(i).scan(s); file.write("bla ").write(i); and same with stdio. Can I?
Oct 30 2004
Lars Ivar Igesund wrote:You mention writef in your subject. D's writef (and writefln) is a typesafe version of printf. You find them in std.stdio.Right. But I still got to use those "%s" etc. things ... -- Dawid Ciężarkiewicz | arael jid: arael fov.pl
Oct 30 2004
Dawid Ciężarkiewicz wrote:Lars Ivar Igesund wrote:Nope, you don't have to. writefln("foo ", 345, " bar ", 345.34, " baz"); you can use them though if you want formatting, like: writefln("round(2): %2.2f", 345.34534);You mention writef in your subject. D's writef (and writefln) is a typesafe version of printf. You find them in std.stdio.Right. But I still got to use those "%s" etc. things ...
Oct 30 2004
"h3r3tic" <foo bar.baz> wrote in message news:cm0iai$2ca$1 digitaldaemon.com...Dawid Ciężarkiewicz wrote:Have you tried: writefln("%"); i can't try it now but i remember it used to not work. Btw (this is reply to Lars Ivar Igesund): writef is runtime type safe, it cheks all the types at runtime, while something like what David (and i) would like does compile time type checking.Lars Ivar Igesund wrote:Nope, you don't have to.You mention writef in your subject. D's writef (and writefln) is a typesafe version of printf. You find them in std.stdio.Right. But I still got to use those "%s" etc. things ...writefln("foo ", 345, " bar ", 345.34, " baz"); you can use them though if you want formatting, like: writefln("round(2): %2.2f", 345.34534);
Oct 30 2004
Mango's got stuff like this. On Sat, 30 Oct 2004 14:35:13 +0200, Dawid wrote:I hate printf. It's type usafe, it likes to crash etc., etc. I wish I could just: char[] s; int i; file.scan(i).scan(s); file.write("bla ").write(i); and same with stdio. Can I?
Oct 30 2004
teqDruid wrote:Mango's got stuff like this.I'll try it - thanks, -- Dawid Ciężarkiewicz | arael jid: arael fov.pl
Oct 31 2004