digitalmars.D.learn - std.boxer type query
- Derek Parnell (14/14) Aug 29 2005 I'm having a mental block and for the life of me a cannot work out how t...
- David L. Davis (31/45) Aug 29 2005 Derek,
- David L. Davis (11/25) Aug 29 2005 Opps!
- Derek Parnell (9/36) Aug 30 2005 Thanks. I forgot about 'typeid()'. This is my first play with boxes. A p...
- Burton Radons (4/37) Sep 02 2005 You can get around this restriction without recompiling Phobos by
- David L. Davis (7/44) Sep 02 2005 Thanks Burton!! :) It's very helpful.
I'm having a mental block and for the life of me a cannot work out how to code a simple and efficient test for the data type of a Box. I want to do this sort of thing ... Box foo; . . . if (foo.type == dchar[]) { . . . } Help! -- Derek Parnell Melbourne, Australia 30/08/2005 2:22:53 AM
Aug 29 2005
In article <1fv0hytva73p0.13560ith3id22.dlg 40tude.net>, Derek Parnell says...I'm having a mental block and for the life of me a cannot work out how to code a simple and efficient test for the data type of a Box. I want to do this sort of thing ... Box foo; . . . if (foo.type == dchar[]) { . . . } Help! -- Derek Parnell Melbourne, Australia 30/08/2005 2:22:53 AMDerek, I hope you find this example code useful: Output: ------- C:\dmd>dmd boxtype.d -release C:\dmd\bin\..\..\dm\bin\link.exe boxtype,,,user32+kernel32/noi; C:\dmd>boxtype dchar[] value=This is a test! C:\dmd> David L. ------------------------------------------------------------------- "Dare to reach for the Stars...Dare to Dream, Build, and Achieve!" ------------------------------------------------------------------- MKoD: http://spottedtiger.tripod.com/D_Language/D_Main_XP.html
Aug 29 2005
In article <1fv0hytva73p0.13560ith3id22.dlg 40tude.net>, Derek Parnell says...I'm having a mental block and for the life of me a cannot work out how to code a simple and efficient test for the data type of a Box. I want to do this sort of thing ... Box foo; . . . if (foo.type == dchar[]) { . . . } Help! -- Derek Parnell Melbourne, Australia 30/08/2005 2:22:53 AMOpps! Line: if (foo.type() == typeid(dchar[])) should be: if (foo.type() is typeid(dchar[])) You may find some other useful code from my Box-Xtras section of my site: http://spottedtiger.tripod.com/D_Language/D_BoxXtras_Support_Projects_XP.html David L. ------------------------------------------------------------------- "Dare to reach for the Stars...Dare to Dream, Build, and Achieve!" ------------------------------------------------------------------- MKoD: http://spottedtiger.tripod.com/D_Language/D_Main_XP.html
Aug 29 2005
On Mon, 29 Aug 2005 17:25:47 +0000 (UTC), David L. Davis wrote:In article <1fv0hytva73p0.13560ith3id22.dlg 40tude.net>, Derek Parnell says...Thanks. I forgot about 'typeid()'. This is my first play with boxes. A pity about the -release restriction. I also found out that you must not have -unittest either.I'm having a mental block and for the life of me a cannot work out how to code a simple and efficient test for the data type of a Box. I want to do this sort of thing ... Box foo; . . . if (foo.type == dchar[]) { . . . } Help! -- Derek Parnell Melbourne, Australia 30/08/2005 2:22:53 AMOpps! Line: if (foo.type() == typeid(dchar[])) should be: if (foo.type() is typeid(dchar[]))You may find some other useful code from my Box-Xtras section of my site: http://spottedtiger.tripod.com/D_Language/D_BoxXtras_Support_Projects_XP.htmlThanks. I'll have a peek or two. -- Derek Parnell Melbourne, Australia 30/08/2005 10:14:47 PM
Aug 30 2005
Derek Parnell wrote:On Mon, 29 Aug 2005 17:25:47 +0000 (UTC), David L. Davis wrote:You can get around this restriction without recompiling Phobos by putting "extern (C) void assert_3std5boxer () { }" in your code. Hopefully this will be one of the fixes in 0.130.In article <1fv0hytva73p0.13560ith3id22.dlg 40tude.net>, Derek Parnell says...Thanks. I forgot about 'typeid()'. This is my first play with boxes. A pity about the -release restriction. I also found out that you must not have -unittest either.I'm having a mental block and for the life of me a cannot work out how to code a simple and efficient test for the data type of a Box. I want to do this sort of thing ... Box foo; . . . if (foo.type == dchar[]) { . . . } Help! -- Derek Parnell Melbourne, Australia 30/08/2005 2:22:53 AMOpps! Line: if (foo.type() == typeid(dchar[])) should be: if (foo.type() is typeid(dchar[]))
Sep 02 2005
In article <df90su$30te$1 digitaldaemon.com>, Burton Radons says...Derek Parnell wrote:Thanks Burton!! :) It's very helpful. David L. ------------------------------------------------------------------- "Dare to reach for the Stars...Dare to Dream, Build, and Achieve!" ------------------------------------------------------------------- MKoD: http://spottedtiger.tripod.com/D_Language/D_Main_XP.htmlOn Mon, 29 Aug 2005 17:25:47 +0000 (UTC), David L. Davis wrote:You can get around this restriction without recompiling Phobos by putting "extern (C) void assert_3std5boxer () { }" in your code. Hopefully this will be one of the fixes in 0.130.In article <1fv0hytva73p0.13560ith3id22.dlg 40tude.net>, Derek Parnell says...Thanks. I forgot about 'typeid()'. This is my first play with boxes. A pity about the -release restriction. I also found out that you must not have -unittest either.I'm having a mental block and for the life of me a cannot work out how to code a simple and efficient test for the data type of a Box. I want to do this sort of thing ... Box foo; . . . if (foo.type == dchar[]) { . . . } Help! -- Derek Parnell Melbourne, Australia 30/08/2005 2:22:53 AMOpps! Line: if (foo.type() == typeid(dchar[])) should be: if (foo.type() is typeid(dchar[]))
Sep 02 2005