Shared Object with DMD v2.031

2009-07-30 Thread teo
I have difficulties creating a Shared Object (.so) with D. Is it possible? Can I use classes defined in the library from the executable? Here is my library file: module test; // file test.d export int testMe() { return 1; } export class Test { private int n; this(int i) { n = i; }

byte to char safe?

2009-07-30 Thread Harry
Again hello, char[6] t = ragain ~ cast(char)7 ~ rhello; use only own write functions is ok? thank you!

Re: byte to char safe?

2009-07-30 Thread BCS
Reply to Harry, Again hello, char[6] t = ragain ~ cast(char)7 ~ rhello; use only own write functions is ok? thank you! I think this will also work and you can be shure it's safe. ragain ~ '\x07' ~ rhello

Re: byte to char safe?

2009-07-30 Thread Ary Borenszweig
Harry escribió: Again hello, char[6] t = ragain ~ cast(char)7 ~ rhello; If you want the result to be again7hello, then no. You must do: char[6] t = ragain ~ '7' ~ rhello; or: char[6] t = ragain ~ (cast(char)('0' + 7)) ~ rhello;

Re: byte to char safe?

2009-07-30 Thread Harry
Ary Borenszweig Wrote: Harry escribió: Again hello, char[6] t = ragain ~ cast(char)7 ~ rhello; If you want the result to be again7hello, then no. You must do: char[6] t = ragain ~ '7' ~ rhello; or: char[6] t = ragain ~ (cast(char)('0' + 7)) ~ rhello; Hello Ary, 7 is data

Re: byte to char safe?

2009-07-30 Thread Daniel Keep
Harry wrote: Again hello, char[6] t = ragain ~ cast(char)7 ~ rhello; use only own write functions is ok? thank you! I think a more significant problem is that again\x07hello can't possibly fit in six characters, unless you're using some crazy numbering system I'm not familiar with.