Have anybody found a way to do transitive packing of bitfields?
For instance, in
import std.bitmanip : bitfields;
struct X
{
// one bit too many to fit in one byte
mixin(bitfields!(bool, `a`, 1,
bool, `b`, 1,
ubyte, `c`, 7,
On Sunday, 30 April 2017 at 02:07:48 UTC, JV wrote:
Hello i'm kinda new to D language and i wanted to make a simple
program
but somehow my input does no go to my if statements and just
continues to ask for the user to input.Kindly help me
One way would be:
import std.stdio;
int x;
On 2017-04-29 20:08, سليمان السهمي (Soulaïman Sahmi) wrote:
GCC has this attribute called abi_tag that they put on any function that
returns std::string or std::list, for the rational behind that read
here:https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html .
the special thing wit
On Sunday, 30 April 2017 at 11:02:52 UTC, Nordlöw wrote:
Have anybody found a way to do transitive packing of bitfields?
For instance, in
import std.bitmanip : bitfields;
struct X
{
// one bit too many to fit in one byte
mixin(bitfields!(bool, `a`, 1,
bool, `b`, 1
On Sunday, 30 April 2017 at 13:22:49 UTC, Stefan Koch wrote:
On Sunday, 30 April 2017 at 11:02:52 UTC, Nordlöw wrote:
Have anybody found a way to do transitive packing of bitfields?
For instance, in
import std.bitmanip : bitfields;
struct X
{
// one bit too many to fit in one byte
mi
Is there a String Comparison Operator in D?
On Sunday, 30 April 2017 at 15:31:39 UTC, Jolly James wrote:
Is there a String Comparison Operator in D?
~
On Sunday, 30 April 2017 at 02:19:29 UTC, bauss wrote:
What exactly did you expect here?
'n' is not in the scope of 'outer'.
'n' is in the scope of 'member'.
Of course it works with 'x.n' since 'x' points to the 'member'
declared inside 'outer'.
I mean it would have worked with classes, but
On Sunday, 30 April 2017 at 15:31:39 UTC, Jolly James wrote:
Is there a String Comparison Operator in D?
Yeah, just the usual comparison operators:
"abc" == "abc"
"abc" != "ABC"
~ is for string concatenation, i.e.:
"abc" ~ "def" == "abcdef"
On Sunday, 30 April 2017 at 15:31:39 UTC, Jolly James wrote:
Is there a String Comparison Operator in D?
You normally use double equation marks (==) to do that.
auto name = "Jack";
if( name == "Jack" ) writeln("Hi Jack!");
Hi!
I have a base class in module A:
module A;
...
class GuiElement: GuiComponent
{
protected
{
GuiElement _parent;
...
}
template isGuiElement(T)
{
enum isGuiElement = is(T: GuiElement);
}
...
and derived class in module B:
module B;
...
class Div(uint dim, uint odim): G
On Sunday, 30 April 2017 at 11:35:54 UTC, Jacob Carlborg wrote:
You can use pragma(mangle, "some mangling"); to set the mangled
name of a symbol.
that's a quick hack, but sooner or later dmd needs to add some
rules for this in the internal cpp mangler, since gcc is the main
compiler in gnu/li
On Sunday, 30 April 2017 at 16:15:41 UTC, Xinok wrote:
On Sunday, 30 April 2017 at 15:31:39 UTC, Jolly James wrote:
Is there a String Comparison Operator in D?
Yeah, just the usual comparison operators:
"abc" == "abc"
"abc" != "ABC"
~ is for string concatenation, i.e.:
"abc" ~ "def" == "ab
Ok, sorry, look's like that was always the case in C++, so it's
too late to question it. I'll just elevate it to package, I guess.
I've got the following code snippet, which almost does what I
want.
struct TaggedType {}
@TaggedType
struct Foo {}
@TaggedType
struct Bar {}
string GenerateTypeEnum()
{
string enumString = "enum TypeEnum {";
foreach (name; __traits(allMembers, mixin(__MODULE__)))
{
import
Hi,
I noticed that on different platforms the
`object.Throwable.TraceInfo` has different formats. A program
compiled on osx with ldc2 has all the TraceInfo empty... Why?
I want to parse those strings or somehow iterate trough all the
stack elements, but if I get a different format on differe
On Sunday, 30 April 2017 at 20:31:09 UTC, Szabo Bogdan wrote:
Hi,
I noticed that on different platforms the
`object.Throwable.TraceInfo` has different formats. A program
compiled on osx with ldc2 has all the TraceInfo empty... Why?
I want to parse those strings or somehow iterate trough all
On 04/30/2017 09:05 PM, bauss wrote:
On Sunday, 30 April 2017 at 16:15:41 UTC, Xinok wrote:
[...]
~ is for string concatenation, i.e.:
[...]
It's not actually a string concatenation operator, it's an array
appending operator.
Appending is related but distinct. `~` does concatenation. `~=` d
On Sunday, 30 April 2017 at 20:05:59 UTC, Kevin Balbas wrote:
I've got the following code snippet, which almost does what I
want.
struct TaggedType {}
@TaggedType
struct Foo {}
@TaggedType
struct Bar {}
string GenerateTypeEnum()
{
string enumString = "enum TypeEnum {";
foreach (name;
On Sunday, 30 April 2017 at 20:58:36 UTC, jkpl wrote:
On Sunday, 30 April 2017 at 20:05:59 UTC, Kevin Balbas wrote:
I've got the following code snippet, which almost does what I
want.
struct TaggedType {}
@TaggedType
struct Foo {}
@TaggedType
struct Bar {}
string GenerateTypeEnum()
{
st
To me this seems like a bug.
On Sunday, 30 April 2017 at 19:05:18 UTC, bauss wrote:
On Sunday, 30 April 2017 at 16:15:41 UTC, Xinok wrote:
On Sunday, 30 April 2017 at 15:31:39 UTC, Jolly James wrote:
Is there a String Comparison Operator in D?
Yeah, just the usual comparison operators:
"abc" == "abc"
"abc" != "ABC"
~
On Sunday, 30 April 2017 at 21:13:07 UTC, Kevin Balbas wrote:
On Sunday, 30 April 2017 at 20:58:36 UTC, jkpl wrote:
On Sunday, 30 April 2017 at 20:05:59 UTC, Kevin Balbas wrote:
Strangely enough, it does work fine in the test snippet,
As well if you import the snippet in another module. That'
On Sunday, 30 April 2017 at 21:31:22 UTC, jkpl wrote:
On Sunday, 30 April 2017 at 21:13:07 UTC, Kevin Balbas wrote:
On Sunday, 30 April 2017 at 20:58:36 UTC, jkpl wrote:
On Sunday, 30 April 2017 at 20:05:59 UTC, Kevin Balbas wrote:
Strangely enough, it does work fine in the test snippet,
As
On Sunday, 30 April 2017 at 22:03:02 UTC, Kevin Balbas wrote:
On Sunday, 30 April 2017 at 21:31:22 UTC, jkpl wrote:
On Sunday, 30 April 2017 at 21:13:07 UTC, Kevin Balbas wrote:
On Sunday, 30 April 2017 at 20:58:36 UTC, jkpl wrote:
On Sunday, 30 April 2017 at 20:05:59 UTC, Kevin Balbas wrote:
I just updated to 2.074.0. I see there's still a README.TXT which
tells me
(on windows) to download dmc, "which contains the linker and
necessary libraries".
Is this out of date? I see a "link.exe" in the dmd package.
Granted it's a bit older, but do I care?
26 matches
Mail list logo