Solution to print Chinese font in console under D2

2009-11-30 Thread Sam Hu
I asked this question a couple of month ago but it is pending,is there any solution now? Thanks.

Re: Solution to print Chinese font in console under D2

2009-11-30 Thread Sam Hu
Sam Hu Wrote: I asked this question a couple of month ago but it is pending,is there any solution now? Thanks. Sorry,Windows (XP).

Re: Potential memory leak?

2009-11-30 Thread Qian Xu
Eldar Insafutdinov wrote: You only have to use scope for top-level QObject subclasses. For anything else you should use auto. Nevertheless, it would be useful if you submit a bug report. Even when my application is multi-thread? I am not sure, if I can declare QPixmap also as auto

Re: How do I find the arity of an Expression? (dmd hacking)

2009-11-30 Thread Ary Borenszweig
Chad J wrote: Given an Expression object in dmd, I'd like to know how many subexpressions it contains and, even better, iterate over them. I'd like to do this in a general way, without having to create cases for all of the different kinds of Expressions. Is there some way to do this that I've

Re: Access to fixed memory locations, head const, ...

2009-11-30 Thread Kuba Ober
I'm contemplating using D for an embedded project where system configuration registers have fixed memory locations. One way of doing it would be to have a constant pointer to a structure with manually aligned members that match the register map, and access them like that. This becomes

Re: How do I find the arity of an Expression? (dmd hacking)

2009-11-30 Thread Ellery Newcomer
On 11/30/2009 03:53 AM, Ary Borenszweig wrote: Chad J wrote: Given an Expression object in dmd, I'd like to know how many subexpressions it contains and, even better, iterate over them. I'd like to do this in a general way, without having to create cases for all of the different kinds of

Re: Question about contracts on methods.

2009-11-30 Thread Don
Peter C. Chapin wrote: Lutger lutger.blijdest...@gmail.com wrote in news:hescc2$16...@digitalmars.com: You are not missing something, this is a known issue. It has been discussed and I believe the intention was to do something about this, but with all the high priorities I'm not sure when

Re: Solution to print Chinese font in console under D2

2009-11-30 Thread Spacen Jasset
Sam Hu wrote: Sam Hu Wrote: I asked this question a couple of month ago but it is pending,is there any solution now? Thanks. Sorry,Windows (XP). Have you set-up an appropriate console font? There are article on the internet on Unicode display and command console.

Re: How do I find the arity of an Expression? (dmd hacking)

2009-11-30 Thread Chad J
Ellery Newcomer wrote: On 11/30/2009 03:53 AM, Ary Borenszweig wrote: Chad J wrote: Given an Expression object in dmd, I'd like to know how many subexpressions it contains and, even better, iterate over them. I'd like to do this in a general way, without having to create cases for all of the

Re: Immutable member functions on mutable objects

2009-11-30 Thread BCS
Hello Tomek, I've got a problem calling an immutable getter on an ordinary object. struct A { float _pole; float pole() immutable { return _pole; } } void main() { A a; auto x = a.pole; // Ouch! } Error: function hello.A.pole () immutable is not callable using argument types () immutable

Re: How do I find the arity of an Expression? (dmd hacking)

2009-11-30 Thread Ellery Newcomer
On 11/30/2009 12:32 PM, Chad J wrote: Ellery Newcomer wrote: On 11/30/2009 03:53 AM, Ary Borenszweig wrote: Chad J wrote: Given an Expression object in dmd, I'd like to know how many subexpressions it contains and, even better, iterate over them. I'd like to do this in a general way, without

Re: How do I find the arity of an Expression? (dmd hacking)

2009-11-30 Thread Ary Borenszweig
Ellery Newcomer wrote: On 11/30/2009 12:32 PM, Chad J wrote: Ellery Newcomer wrote: On 11/30/2009 03:53 AM, Ary Borenszweig wrote: Chad J wrote: Given an Expression object in dmd, I'd like to know how many subexpressions it contains and, even better, iterate over them. I'd like to do this in

Re: How do I find the arity of an Expression? (dmd hacking)

2009-11-30 Thread Chad J
I think I'll reply to both of you in one post since the thoughts are related. Ary Borenszweig wrote: Ellery Newcomer wrote: Not that I know anything about DMD outside parse.c, but in expression.h, there be decls along the lines of struct UnaExp{ Expression* e1; } struct BinExp{

Re: Solution to print Chinese font in console under D2

2009-11-30 Thread Sam Hu
Spacen Jasset Wrote: Sam Hu wrote: Sam Hu Wrote: I asked this question a couple of month ago but it is pending,is there any solution now? Thanks. Sorry,Windows (XP). Have you set-up an appropriate console font? There are article on the internet on Unicode display and command

Re: Startup from registry program doesn't work

2009-11-30 Thread Sam Hu
Richard Webb Wrote: Do you need to be calling RegOpenKeyEx with KEY_WRITE instead of KEY_READ ? Thanks,I changed to KEY_WRITE and the function now return true when the app executes.However the specified app dosn't start up automatically,when I check the startup settings by some third party

Re: Question about contracts on methods.

2009-11-30 Thread Peter C. Chapin
Don nos...@nospam.com wrote in news:hf0obf$1th...@digitalmars.com: void next() in { int original_day_m = day_m; int original_month_m = month_m; int original_year_m = year_m; } out { assert( ... expression using original_day_m, etc ... )

Re: How do I find the arity of an Expression? (dmd hacking)

2009-11-30 Thread Ellery Newcomer
On 11/30/2009 07:59 PM, Chad J wrote: If you care for a bit of reading, I'll tell you my story and ping an idea. This is about the property expression rewrite of course. I'd love to just use the current convention in dmd and write the rewrite as a non-recursive function that gets called at