On Thursday, 25 August 2016 at 01:37:05 UTC, Mike Parker wrote:
On Wednesday, 24 August 2016 at 23:04:25 UTC, Illuminati wrote:
How can I create nested enum like structures?
instead of Enum.X_Y I would like to access like Enum.X.Y
Yet I want it to behave exactly as an enum. I just want to
On Thursday, 25 August 2016 at 11:09:43 UTC, Cauterite wrote:
On Thursday, 25 August 2016 at 10:36:21 UTC, Daniel Kozak wrote:
Btw, tehre is no need for extra semicolon (`;`) after enum and
struct definition
Thanks. This forum insists on reminding me every time I write
code here.
Warning ab
On Thursday, 25 August 2016 at 10:36:21 UTC, Daniel Kozak wrote:
Btw, tehre is no need for extra semicolon (`;`) after enum and
struct definition
Thanks. This forum insists on reminding me every time I write
code here.
Btw, tehre is no need for extra semicolon (`;`) after enum and struct
definition
Dne 25.8.2016 v 12:23 Cauterite via Digitalmars-d-learn napsal(a):
On Wednesday, 24 August 2016 at 23:04:25 UTC, Illuminati wrote:
Well those other answers aren't wrong, but I envisioned that you'd
have multi
On Wednesday, 24 August 2016 at 23:04:25 UTC, Illuminati wrote:
Well those other answers aren't wrong, but I envisioned that
you'd have multiple categories within your sub-enums and whatnot,
so you'd need something more like this:
struct A {
enum X {
one,
Wednesday, 24 August 2016 at 23:04:25 UTC, Illuminati wrote:
How can I create nested enum like structures?
instead of Enum.X_Y I would like to access like Enum.X.Y
Yet I want it to behave exactly as an enum. I just want to not use _
as .'s are better as they express more clearly what I want.
s
On Wednesday, 24 August 2016 at 23:04:25 UTC, Illuminati wrote:
How can I create nested enum like structures?
instead of Enum.X_Y I would like to access like Enum.X.Y
Yet I want it to behave exactly as an enum. I just want to not
use _ as .'s are better as they express more clearly w
How can I create nested enum like structures?
instead of Enum.X_Y I would like to access like Enum.X.Y
Yet I want it to behave exactly as an enum. I just want to not
use _ as .'s are better as they express more clearly what I want.
On Tuesday, 16 July 2013 at 21:12:36 UTC, Ali Çehreli wrote:
On 07/16/2013 02:01 PM, Ali Çehreli wrote:
> On 07/16/2013 01:40 PM, JS wrote:
> > It would be nice if we had some way to data globally(in
module).
> >
> > e.g., __ctfestore["name"] = value;
>
> I would expect model-level objects s
On 07/16/2013 02:01 PM, Ali Çehreli wrote:
> On 07/16/2013 01:40 PM, JS wrote:
> > It would be nice if we had some way to data globally(in module).
> >
> > e.g., __ctfestore["name"] = value;
>
> I would expect model-level objects start their lives after the program
> starts running but their
On 07/16/2013 01:40 PM, JS wrote:
> The problem is I can't declare my "global" int variables directly inside
> the template. This does make it hard to use the same variable across
> multiple functions...
>
> template A
> {
> int c; // makes c near useless, can't use it like a normal it...
>
On Tuesday, 16 July 2013 at 14:05:38 UTC, Ali Çehreli wrote:
On 07/15/2013 10:51 PM, JS wrote:
> On Tuesday, 16 July 2013 at 04:37:33 UTC, Ali Çehreli wrote:
>> On 07/15/2013 08:43 PM, JS wrote:
>>
>> > http://dpaste.dzfl.pl/7c8b0ba9
>> >
>> > Why the heck can't we use integers in ctfe's? There
On 07/15/2013 10:51 PM, JS wrote:
> On Tuesday, 16 July 2013 at 04:37:33 UTC, Ali Çehreli wrote:
>> On 07/15/2013 08:43 PM, JS wrote:
>>
>> > http://dpaste.dzfl.pl/7c8b0ba9
>> >
>> > Why the heck can't we use integers in ctfe's? There seems to
>> be no
>> > simple way to create a counter and this
On 07/15/2013 08:43 PM, JS wrote:
> http://dpaste.dzfl.pl/7c8b0ba9
>
> Why the heck can't we use integers in ctfe's?
That is false:
import std.range;
import std.algorithm;
import std.conv;
import std.stdio;
string makeCode(int begin, int end)
{
auto result = appender!string(`enum made = "`
On Tuesday, 16 July 2013 at 05:51:53 UTC, JS wrote:
...
Once again you post a complex and messy snippet and than jump to
wrong conclusions. This works:
template inc(int i)
{
enum inc = i + 1;
}
pragma(msg, inc!3);
Integers are treated normally in CTFE/templates, contrary to your
last
On Tuesday, 16 July 2013 at 04:37:33 UTC, Ali Çehreli wrote:
On 07/15/2013 08:43 PM, JS wrote:
> http://dpaste.dzfl.pl/7c8b0ba9
>
> Why the heck can't we use integers in ctfe's? There seems to
be no
> simple way to create a counter and this is one of the most
basic
> programming constructs to us
On 07/15/2013 08:43 PM, JS wrote:
> http://dpaste.dzfl.pl/7c8b0ba9
>
> Why the heck can't we use integers in ctfe's? There seems to be no
> simple way to create a counter and this is one of the most basic
> programming constructs to use.. yet with ctfe's it's impossible.
>
> I'd like each variabl
http://dpaste.dzfl.pl/7c8b0ba9
Why the heck can't we use integers in ctfe's? There seems to be
no simple way to create a counter and this is one of the most
basic programming constructs to use.. yet with ctfe's it's
impossible.
I'd like each variable in the nested structs to be incremented
18 matches
Mail list logo