Re: linking works with windows Dll, but access violations occur

2010-09-08 Thread Kagamin
You probably mess calling convention.

Convert strings with different format to float

2010-09-08 Thread Tom Kazimiers
Hi, I try to read data in from a file. This data consist mainly of numbers and I have a hard time converting it to number type variables. Two data lines could look like this v 0 0 0 v 1.5 1.2 0 Now I want to parse those lines and call a method, the line in passed (as char[]) to it: int index =

Re: Convert strings with different format to float

2010-09-08 Thread Jonathan M Davis
On Wednesday 08 September 2010 00:23:31 Tom Kazimiers wrote: Hi, I try to read data in from a file. This data consist mainly of numbers and I have a hard time converting it to number type variables. Two data lines could look like this v 0 0 0 v 1.5 1.2 0 Now I want to parse those

__traits(moduleName)?

2010-09-08 Thread Nick Sabalausky
Is there some way, maybe with __traits, to get the name of the current module?

Re: Convert strings with different format to float

2010-09-08 Thread Stanislav Blinov
Jonathan M Davis wrote: On Wednesday 08 September 2010 00:23:31 Tom Kazimiers wrote: Hi, I try to read data in from a file. This data consist mainly of numbers and I have a hard time converting it to number type variables. Two data lines could look like this v 0 0 0 v 1.5 1.2 0 Now I want to

Re: Generic collection/element function signatures in D2 versus D1

2010-09-08 Thread Steven Schveighoffer
On Tue, 07 Sep 2010 14:06:58 -0400, Steven Schveighoffer schvei...@yahoo.com wrote: On Tue, 07 Sep 2010 11:37:20 -0400, Pelle pelle.mans...@gmail.com wrote: On 09/07/2010 04:33 PM, Steven Schveighoffer wrote: Yes, a valid return. Your function should be: void foo(void delegate(const(C)

Re: Convert strings with different format to float

2010-09-08 Thread Don
Pelle wrote: On 09/08/2010 09:23 AM, Tom Kazimiers wrote: Hi, I try to read data in from a file. This data consist mainly of numbers and I have a hard time converting it to number type variables. Two data lines could look like this v 0 0 0 v 1.5 1.2 0 Now I want to parse those lines and call

Re: Generic collection/element function signatures in D2 versus D1

2010-09-08 Thread Pelle
On 09/08/2010 02:24 PM, Steven Schveighoffer wrote: On Tue, 07 Sep 2010 14:06:58 -0400, Steven Schveighoffer schvei...@yahoo.com wrote: On Tue, 07 Sep 2010 11:37:20 -0400, Pelle pelle.mans...@gmail.com wrote: On 09/07/2010 04:33 PM, Steven Schveighoffer wrote: Yes, a valid return. Your

Re: Convert strings with different format to float

2010-09-08 Thread Tom Kazimiers
Hi, On 09/08/2010 10:02 AM, Stanislav Blinov wrote: I would have thought that to!float() could handle a number without a decimal point. If it can't I would suggest creating a bug report for it. Now, since such a fix would not help you immediately in either case, I would suggest creating a

Re: Convert strings with different format to float

2010-09-08 Thread Stanislav Blinov
08.09.2010 20:46, Tom Kazimiers wrote: Great! I am looking forward to that release :-). Any idea when it will be available? For the mean time I will, as proposed, make a separate function that checks if there is a dot in it or not. Then I take to!float and to!int, respectively. Cheers, Tom

Re: Convert strings with different format to float

2010-09-08 Thread Tom Kazimiers
On 09/08/2010 06:58 PM, Stanislav Blinov wrote: 08.09.2010 20:46, Tom Kazimiers wrote: Great! I am looking forward to that release :-). Any idea when it will be available? For the mean time I will, as proposed, make a separate function that checks if there is a dot in it or not. Then I take