Re: dmdscript osx.mak

2011-06-18 Thread Dmitry Olshansky
On 18.06.2011 10:35, Joshua Niehus wrote: Hello, I apologize if this is the wrong forum to post this question, but I couldn't find a corresponding learn mailing list for DMDScript. I wanted to play around with DMDScript but cant seem to get started. I downloaded the source and attempted to

Re: dmdscript osx.mak

2011-06-18 Thread Robert Clipsham
On 18/06/2011 21:50, Robert Clipsham wrote: On 18/06/2011 07:35, Joshua Niehus wrote: Hello, I apologize if this is the wrong forum to post this question, but I couldn't find a corresponding learn mailing list for DMDScript. I wanted to play around with DMDScript but cant seem to get started.

Re: dmdscript osx.mak

2011-06-18 Thread Robert Clipsham
On 18/06/2011 07:35, Joshua Niehus wrote: Hello, I apologize if this is the wrong forum to post this question, but I couldn't find a corresponding learn mailing list for DMDScript. I wanted to play around with DMDScript but cant seem to get started. I downloaded the source and attempted to mak

Re: dummy question : runtime type testing...

2011-06-18 Thread Lloyd Dupont
on a related not. in the (templated) function taking a variant, I use the coerce() method which does some conversion (byte to int, for example) the suggested code (while excellent, much thanks again!) is very stringent, doesn't allow for such implicit conversion i.e. with bool isTypeOf(TypeI

Re: dummy question : runtime type testing...

2011-06-18 Thread Lloyd Dupont
That simple hey?!? Awesome! You are a week-end saver! :) "Mike Wey" wrote in message news:ithv61$2j5t$1...@digitalmars.com... bool isTypeOf(T)(TypeInfo ti) { return ( typeid(T) is ti ); } bool isTypeOf(TypeInfo ti1, TypeInfo ti2) { return ( ti1 is ti2 ); } -- Mike Wey

Re: dummy question : runtime type testing...

2011-06-18 Thread Mike Wey
On 06/18/2011 05:28 AM, Lloyd Dupont wrote: ho... easy hey! but how about the other 2 test I'd like be able to run? bool isTypeOf(T)(TypeInfo ti) { "return T is ti" } bool isTypeOf(TypeInfo ti1, TypeInfo ti2) { "return ti1 is ti2" } bool isTypeOf(T)(TypeInfo ti) { return ( typeid(T) is ti

TypeInfo problem

2011-06-18 Thread Lloyd Dupont
Let's say I have 2 value only accessible through function pointers taking a variant parameter. (they will throw on incorrect value, but I'd rather avoid that). I also know the TypeInfo of both variables. How could I know that a given TypeInfo is a valid value for another TypeInfo. In other wor