Re: Get current date and time with std.datetime

2011-10-06 Thread Jonathan M Davis
On Thursday, October 06, 2011 23:31:26 Jonathan M Davis wrote: > On Friday, October 07, 2011 08:23:10 Jacob Carlborg wrote: > > On 2011-10-07 08:15, Jonathan M Davis wrote: > > > On Friday, October 07, 2011 19:08:33 Joel Christensen wrote: > > >> Hi, > > >> > > >> I have a program that uses the ol

Re: Get current date and time with std.datetime

2011-10-06 Thread Jonathan M Davis
On Friday, October 07, 2011 08:23:10 Jacob Carlborg wrote: > On 2011-10-07 08:15, Jonathan M Davis wrote: > > On Friday, October 07, 2011 19:08:33 Joel Christensen wrote: > >> Hi, > >> > >> I have a program that uses the old time stuff before the module > >> std.datetime. I have a DateTime object,

Re: Get current date and time with std.datetime

2011-10-06 Thread Jacob Carlborg
On 2011-10-07 08:15, Jonathan M Davis wrote: On Friday, October 07, 2011 19:08:33 Joel Christensen wrote: Hi, I have a program that uses the old time stuff before the module std.datetime. I have a DateTime object, but I can't seem to set its properties to the current time. Some thing like: Dat

Re: Get current date and time with std.datetime

2011-10-06 Thread Jonathan M Davis
On Friday, October 07, 2011 19:08:33 Joel Christensen wrote: > Hi, > > I have a program that uses the old time stuff before the module > std.datetime. I have a DateTime object, but I can't seem to set its > properties to the current time. > > Some thing like: > DateTime dateTime; > dateTime = get

Get current date and time with std.datetime

2011-10-06 Thread Joel Christensen
Hi, I have a program that uses the old time stuff before the module std.datetime. I have a DateTime object, but I can't seem to set its properties to the current time. Some thing like: DateTime dateTime; dateTime = getCurrentDateTime(); -JoelCNZ

Re: Stack Overflow error missing

2011-10-06 Thread Jonathan M Davis
On Friday, October 07, 2011 05:28:39 Andrej Mitrovic wrote: > I'm fairly sure this used to give me a stack overflow error: > void test() { > test(); > } > > void main() { > test(); > } > > Now it only returns exit code -1073741819. > > Could this be related to how WinXP managers error re

Stack Overflow error missing

2011-10-06 Thread Andrej Mitrovic
I'm fairly sure this used to give me a stack overflow error: void test() { test(); } void main() { test(); } Now it only returns exit code -1073741819. Could this be related to how WinXP managers error reporting? It's possible that I have some error reporting service disabled, but I'll h

Re: Implicit cast to immutable

2011-10-06 Thread Steven Schveighoffer
On Wed, 05 Oct 2011 19:19:37 -0400, bearophile wrote: Do you know why this program doesn't compile (with DMD 2.056head)? immutable(int[]) foo(in int[] x) pure { return new int[1]; } void main() {} It gives: test.d(2): Error: cannot implicitly convert expression (new int[](1u)) of ty

Re: Implicit cast to immutable

2011-10-06 Thread bearophile
Christophe: > That is very consistent, so I don't think this > should be considered as a bug. There may be an improvement to ask to > make the compiler able to check when the cast to immutable is safe, but > I don't think there is a bug. The compiler already performs such checks, in this case

Re: Implicit cast to immutable

2011-10-06 Thread Christophe
bearophile , dans le message (digitalmars.D.learn:29961), a écrit : > Andrej Mitrovic: > >> Maybe: >> >> immutable(int[]) foo(in int[] x) pure { >>return new immutable(int[1]); >> } >> >> void main() {} > > I'd like to know why the code in my original post doesn't compile. I suspect > it's