Re: immutable string

2013-04-27 Thread Jonathan M Davis
On Saturday, April 27, 2013 20:14:10 Michael wrote: > According to http://dlang.org/const3.html > > >The simplest immutable declarations use it as a storage class. > >It can be used to declare manifest constants. > > So, immutable string s = "..."; should be a manifest constant. > > If it is a c

Re: Simple delete directory tree?

2013-04-27 Thread Jonathan M Davis
On Friday, April 26, 2013 17:01:43 Nick Sabalausky wrote: > On Fri, 26 Apr 2013 22:55:36 +0200 > > "Andrej Mitrovic" wrote: > > On Friday, 26 April 2013 at 20:54:41 UTC, Nick Sabalausky wrote: > > > Does phobos have a simple way to delete a directory tree? > > > std.file.rmdir(path) and std.file.

Re: DWT Gui program without console

2013-04-27 Thread Adam D. Ruppe
This is a bit of a faq! There's two solutions, a def file or a command line argument to the linker. The first two posts here describe the .def file: http://forum.dlang.org/thread/xkvdpdsfzevanucrg...@forum.dlang.org And if you scroll down a bit to this post: http://forum.dlang.org/thread/xkvdpd

DWT Gui program without console

2013-04-27 Thread user
Hi, writing a GUI tool using DWT, looks like the windows console pops up everytime I run the tool. How can I prevent/supress the console? I did some googling and found a tip that -version=gui helps, but its not working for me. Thanks in advance. user

Re: C++ and D bool compatibility

2013-04-27 Thread bearophile
Jeremy DeHaan: I was reading this: http://dlang.org/cpp_interface.html And it mentions the various types and their compatibility with one another, but it leaves out bools. It would be very useful for me if it works out like this, but does anyone know off the top of their heads/tried it befor

C++ and D bool compatibility

2013-04-27 Thread Jeremy DeHaan
Hey guys! I was reading this: http://dlang.org/cpp_interface.html And it mentions the various types and their compatibility with one another, but it leaves out bools. It would be very useful for me if it works out like this, but does anyone know off the top of their heads/tried it before?

Re: immutable string

2013-04-27 Thread Namespace
On Saturday, 27 April 2013 at 21:46:03 UTC, Minas Mina wrote: On Saturday, 27 April 2013 at 18:14:11 UTC, Michael wrote: According to http://dlang.org/const3.html The simplest immutable declarations use it as a storage class. It can be used to declare manifest constants. So, immutable string

Re: immutable string

2013-04-27 Thread Minas Mina
On Saturday, 27 April 2013 at 18:14:11 UTC, Michael wrote: According to http://dlang.org/const3.html The simplest immutable declarations use it as a storage class. It can be used to declare manifest constants. So, immutable string s = "..."; should be a manifest constant. If it is a constant

Re: string enums

2013-04-27 Thread Ali Çehreli
On 04/27/2013 12:02 PM, Lodo wrote: > I found that if I try to make an enum of doubles, dmd outputs 36 very > complex error messages. That works too. Tried with 2.063-devel-f6d55a9-dirty: enum Type : double { a = 1.5, b = 2.5 } void main() { auto e = Type.min; } Ali

Re: string enums

2013-04-27 Thread Lodo
On Saturday, 27 April 2013 at 18:41:45 UTC, Namespace wrote: Works fine for me with dmd >= 2.062 I'm using dmd 2.059. Maybe I will update it. I'm using MonoDevelop as IDE. I found that if I try to make an enum of doubles, dmd outputs 36 very complex error messages. I will try to investigate f

Re: string enums

2013-04-27 Thread Namespace
On Saturday, 27 April 2013 at 18:34:24 UTC, Lodo wrote: Hi! I'm having some troubles with an enum with base type string. Here's the code: enum Type:string { DOT="DOT", ID="ID", MODULE="MODULE", SEMICOLON="SEMICOLON", ERROR="ERROR", EOF="EOF" } For

Re: string enums

2013-04-27 Thread Adam D. Ruppe
I can't help too much with your problem because I tried it and it works for me (on my dmd 2.061), but the pattern you're doing there is actually unneeded: enum Type { DOT, ID, MODULE, /* etc */ } would actually work and you can get a string out of it with std.conv.to: import std.conv

string enums

2013-04-27 Thread Lodo
Hi! I'm having some troubles with an enum with base type string. Here's the code: enum Type:string { DOT="DOT", ID="ID", MODULE="MODULE", SEMICOLON="SEMICOLON", ERROR="ERROR", EOF="EOF" } For every element of the enum, dmd writes this message two t

Re: immutable string

2013-04-27 Thread Andrej Mitrovic
On Saturday, 27 April 2013 at 18:14:11 UTC, Michael wrote: Why? Probably outdated documentation (and in upcoming 2.063 this will be enforced properly). Use enum instead.

immutable string

2013-04-27 Thread Michael
According to http://dlang.org/const3.html The simplest immutable declarations use it as a storage class. It can be used to declare manifest constants. So, immutable string s = "..."; should be a manifest constant. If it is a constant that it can be used in switch(...). switch(someStr) { c

Re: Internationalization vs. Unicode

2013-04-27 Thread Jacob Carlborg
On 2013-04-27 00:09, Tyro[17] wrote: There are myriad encoding schemes. D natively supports Unicode and provide functionality via phobos. A byproduct of this is that since ASCII is a subset of Unicode, it also natively support ASCII. This is a plus for the language but what of the other encoding

Re: Simple delete directory tree?

2013-04-27 Thread Jacob Carlborg
On 2013-04-26 23:25, Nick Sabalausky wrote: FWIW, This seems to work fine, at least on windows: import std.process; version(Windows) system(`rmdir /S /Q "`~path~`"`); else system(`rm -rf '`~path~`'`); That's cheating. -- /Jacob Carlborg

Re: does GtkD (win7) support opengl?

2013-04-27 Thread Alexandr Druzhinin
27.04.2013 0:57, Mike Wey пишет: Should be working now. Yes, 32bit binary works well (didn't run 64bit). Thank you very much!