Forum Navigation
whisper confuzzle
Moderators:
kris
Posted: 09/05/08 01:36:20Hello.
Playing with FileConduit/Writer?, I came across the following. Is it not supposed to do that, or am I just being dumb?
tak.d(15): Error: writer is used as a type tak.d(15): Error: writer is used as a type tak.d(15): Error: can't have array of void() tak.d(15): Error: declaration tak.main.c is already defined tak.d(19): Error: reader is used as a type tak.d(19): Error: d2 is used as a type tak.d(19): Error: cannot have parameter of type void tak.d(19): Error: reader is used as a type tak.d(19): Error: d2 is used as a type tak.d(19): Error: cannot have parameter of type void tak.d(19): Error: can't have array of void(void) tak.d(19): Error: declaration tak.main.c is already definedfrom this:
writer(c[0])(d)(); ... reader(c[0])(d2);in this:
import tango.io.Stdout; import tango.io.FileConduit; import tango.io.protocol.Writer; import tango.io.protocol.Reader; void main(char[][] args){ auto f = new FileConduit("test.dat",FileConduit.WriteCreate); auto writer = new Writer(f); auto reader = new Reader(f); char[] c = new char[23]; c[0..11] = "hello world".dup; double d = 3.14159; writer(c[0])(d)(); f.seek(0); char[] c2 = new char[12]; double d2; reader(c[0])(d2); Stdout(c[0]).newline; Stdout(d2).newline; }
Author Message
Posted: 09/05/08 01:37:44Whoops,
I'm using DMD 1.033 and tango 0.997, I think.