On 2012-08-30 08:28, Jacob Carlborg wrote:
It works for me. DMD 2.060 Mac OS X.
Oh, it does not. If I replace:
enum string[] fields = [EnumMembers!E].to!(string[]);
With:
enum string[] fields = ["one", "two"];
It works.
--
/Jacob Carlborg
On 2012-08-30 02:13, cal wrote:
Given this code for CTFE on a string array:
enum E {one, two}
enum string[] fields = [EnumMembers!E].to!(string[]);
string print(string[] fields)
{
string s;
foreach(string field; fields)
{
s ~= field.toUpper ~ ", ";
}
return s;
On Thursday, 30 August 2012 at 05:26:52 UTC, Philippe Sigaud
wrote:
And with no UFCS ? Did you try s ~= toUpper(field) ~ ", ";
Yeah with or without UFCS, the second one fails.
On 08/29/2012 06:46 PM, Andrei Alexandrescu wrote:
On 8/29/12 4:52 PM, Charles Hixson wrote:
On 08/29/2012 04:15 PM, Andrei Alexandrescu wrote:
On 8/29/12 3:47 PM, Charles Hixson wrote:
Where should I look to better understand
rdmd? I expected to need to list all the local files that were need
On Thu, Aug 30, 2012 at 2:13 AM, cal wrote:
> Given this code for CTFE on a string array:
>
> enum E {one, two}
> enum string[] fields = [EnumMembers!E].to!(string[]);
>
> string print(string[] fields)
> {
> string s;
> foreach(string field; fields)
> {
> s ~= field.toUpper ~ "
On Thu, Aug 30, 2012 at 1:09 AM, Charles Hixson
wrote:
> Well, it worked until I started "depending on it". Then it stopped.
> So I guess that, at least for exceptions, they need to be defined within the
> same file that they are used for rdmd to be happy with them, though clearly
> that's not tr
On 8/29/12 4:52 PM, Charles Hixson wrote:
On 08/29/2012 04:15 PM, Andrei Alexandrescu wrote:
On 8/29/12 3:47 PM, Charles Hixson wrote:
Where should I look to better understand
rdmd? I expected to need to list all the local files that were needed,
but clearly that's the wrong approach.
http://
Given this code for CTFE on a string array:
enum E {one, two}
enum string[] fields = [EnumMembers!E].to!(string[]);
string print(string[] fields)
{
string s;
foreach(string field; fields)
{
s ~= field.toUpper ~ ", ";
}
return s;
}
pragma(msg, print(["one", "two"]));
On 08/29/2012 04:15 PM, Andrei Alexandrescu wrote:
On 8/29/12 3:47 PM, Charles Hixson wrote:
Where should I look to better understand
rdmd? I expected to need to list all the local files that were needed,
but clearly that's the wrong approach.
http://dlang.org/rdmd.html
To my surprise, it's n
On 08/29/2012 03:47 PM, Charles Hixson wrote:
On 08/29/2012 01:36 PM, Dmitry Olshansky wrote:
On 30-Aug-12 00:14, Charles Hixson wrote:
Is the following expected?
When I put the exception:
class LogicError : Exception
{
this( string file = __FILE__, size_t line = __LINE__, Throwable
next = null
On 8/29/12 3:47 PM, Charles Hixson wrote:
Where should I look to better understand
rdmd? I expected to need to list all the local files that were needed,
but clearly that's the wrong approach.
http://dlang.org/rdmd.html
To my surprise, it's not in the top Google search results. However,
Dmitr
On 08/29/2012 01:36 PM, Dmitry Olshansky wrote:
On 30-Aug-12 00:14, Charles Hixson wrote:
Is the following expected?
When I put the exception:
class LogicError : Exception
{
this( string file = __FILE__, size_t line = __LINE__, Throwable
next = null )
{
super( "Internal logic error", file, line,
On 30-Aug-12 00:14, Charles Hixson wrote:
Is the following expected?
When I put the exception:
class LogicError : Exception
{
this( string file = __FILE__, size_t line = __LINE__, Throwable
next = null )
{
super( "Internal logic error", file, line, next );
}
}
In the same
Is the following expected?
When I put the exception:
class LogicError : Exception
{
this( string file = __FILE__, size_t line = __LINE__, Throwable
next = null )
{
super( "Internal logic error", file, line, next );
}
}
In the same file as the rest of the program,
rdmd --main
On 08/28/2012 01:03 PM, Ellery Newcomer wrote:
On 08/28/2012 09:55 AM, Regan Heath wrote:
> I searched the DMD sources, just in case the message "abnormal
> program termination" was DMD specific, and I found nothing. Then I
> searched all files and the string appears in the dmd.exe binary,
>
On 08/29/2012 03:38 PM, monarch_dodra wrote:
D provides ways to operate on an entire (sub) slice:
int[] a = ... ;
a[] *= 5; //Multiply everything by 5.
a[0 .. 2] = 3; //Set indexes 0 to 1 to the value 3.
I was wondering if there was any way to do this for a specified function?
struct S
{
Yes, I don't now about 2.059 (I've just recently make my comeback to D) but
very simple ctRegex-es take pretty quickly all the memory (6GB) of my
laptop.
"David" wrote in message news:k1aqf9$q76$1...@digitalmars.com...
> Am 25.08.2012 17:17, schrieb nazriel:
>> First of all:
>> *First read whol
D provides ways to operate on an entire (sub) slice:
int[] a = ... ;
a[] *= 5; //Multiply everything by 5.
a[0 .. 2] = 3; //Set indexes 0 to 1 to the value 3.
I was wondering if there was any way to do this for a specified
function?
struct S
{
void foo()
{
writeln("foo");
On Tue, 28 Aug 2012 21:03:47 +0100, Ellery Newcomer
wrote:
If you like, you could try building the unreduced case
download pyd
https://bitbucket.org/ariovistus/pyd
from top dir, run (python setup.py install)
go to examples/wrap, run (python setup.py build)
Ok. I downloaded and installed p
On Wed, 29 Aug 2012 09:47:57 +0100, Regan Heath
wrote:
On Tue, 28 Aug 2012 21:03:47 +0100, Ellery Newcomer
wrote:
If you like, you could try building the unreduced case
download pyd
https://bitbucket.org/ariovistus/pyd
from top dir, run (python setup.py install)
go to examples/wrap, run
20 matches
Mail list logo