On 5/14/16 12:35 AM, Steven Schveighoffer wrote:
On 5/13/16 12:59 AM, Andrew Edwards wrote:
On 5/13/16 8:40 AM, Andrew Edwards wrote:
That seems wrong. You can't assign to an enum. Besides, doesn't your
declaration of MIN shadow whatever other definitions may be
currently in
effect?
Okay,
On 05/13/2016 11:41 AM, Jamal wrote:
Warning D newb here.
Is it possible to define a member function outside of the class/struct
like in C++;
class x { body
void foo(int* i);
};
void x::foo(int* i){
*i++;
}
Or is it just D-like to define everything inside the class/struct body?
On 5/13/16 2:41 PM, Jamal wrote:
Warning D newb here.
Is it possible to define a member function outside of the class/struct
like in C++;
Not within the same file.
You can have an "interface file", extension .di, which hides the bodies
of functions. But inside the implementation file, you
Warning D newb here.
Is it possible to define a member function outside of the
class/struct like in C++;
class x { body
void foo(int* i);
};
void x::foo(int* i){
*i++;
}
Or is it just D-like to define everything inside the class/struct
body?
On Thursday, 12 May 2016 at 22:51:17 UTC, Andrew Edwards wrote:
The following preprocessor directives are frequently
encountered in C code, providing a default constant value where
the user of the code has not specified one:
#ifndef MIN
#define MIN 99
#endif
On Friday, 13 May 2016 at 06:33:40 UTC, Jacob Carlborg wrote:
Even better is to use "rdmd" which will automatically track and
compile dependencies.
but i should warn about annoing bug with local import
http://forum.dlang.org/post/mailman.1984.1373610213.13711.digitalmar...@puremagic.com
On Thursday, 12 May 2016 at 22:51:17 UTC, Andrew Edwards wrote:
The following preprocessor directives are frequently
encountered in C code, providing a default constant value where
the user of the code has not specified one:
#ifndef MIN
#define MIN 99
#endif
On 5/13/16 12:59 AM, Andrew Edwards wrote:
On 5/13/16 8:40 AM, Andrew Edwards wrote:
That seems wrong. You can't assign to an enum. Besides, doesn't your
declaration of MIN shadow whatever other definitions may be currently in
effect?
Okay, got it. It seams I just hadn't hit that bug yet
On 2016-05-13 08:27, Andrew Edwards wrote:
I fail to see why the compiler would be less capable at this task than
rdmd. Since it is already build to accept multiple input files and knows
more about what's going on during compilation than rdmd will ever know,
in does not make sense that it
On Friday, 13 May 2016 at 10:19:04 UTC, Nordlöw wrote:
-gsalways emit stack frame
IIRC, not emitting a stack frame is an optimization which
confuses debuggers. So I think this can be used to make optimized
builds a bit easier to debug.
-gxadd stack stomp code
Wow, thanks Steve :)
What role does the DMD flags -gs and -gx play?
The documentation says
-gsalways emit stack frame
-gxadd stack stomp code
which I don't know what it means.
On 5/13/16 3:23 PM, tsbockman wrote:
On Friday, 13 May 2016 at 06:05:14 UTC, Andrew Edwards wrote:
Additionally, what's the best way to handle nested #ifdef's? Those
that appear inside structs, functions and the like... I know that
global #ifdef's are turned to version blocks but versions
On 2016-05-13 08:10, tsbockman wrote:
According to the DMD compiler manual, the -run switch only accepts a
single source file:
-run srcfile args...
After the first source file, any further arguments passed to DMD will be
interpreted as arguments to be passed to the program being run.
To
On 5/13/16 3:10 PM, tsbockman wrote:
On Friday, 13 May 2016 at 01:16:36 UTC, Andrew Edwards wrote:
command: dmd -run mod inc
output:
Undefined symbols for architecture x86_64:
"_D3inc5printFZv", referenced from:
__Dmain in mod.o
ld: symbol(s) not found for architecture x86_64
clang:
On Friday, 13 May 2016 at 06:05:14 UTC, Andrew Edwards wrote:
Additionally, what's the best way to handle nested #ifdef's?
Those that appear inside structs, functions and the like... I
know that global #ifdef's are turned to version blocks but
versions blocks cannot be used inside classes,
On Friday, 13 May 2016 at 01:16:36 UTC, Andrew Edwards wrote:
command: dmd -run mod inc
output:
Undefined symbols for architecture x86_64:
"_D3inc5printFZv", referenced from:
__Dmain in mod.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit
On 5/13/16 7:51 AM, Andrew Edwards wrote:
The following preprocessor directives are frequently encountered in C
code, providing a default constant value where the user of the code has
not specified one:
#ifndef MIN
#define MIN 99
#endif
#ifndef MAX
#define MAX
On Friday, 13 May 2016 at 04:59:23 UTC, Andrew Edwards wrote:
Is there a way to reproduce the same behavior? Are there
reason's for not allowing this functionality or am I just
misunderstanding and going about things the wrong way?
[1] same result whether placed before or after the
19 matches
Mail list logo