On Sunday, 25 December 2011 at 22:46:33 UTC, Joshua Reusch wrote:
public string some_var = "Hello, world!";
It's important to note that public is the default access level
here.
Am 25.12.2011 22:37, schrieb Tal:
I want to save the hInstance of WinMain so I would be able to use it later in
some
other module. So how do I accomplish that ?
If you don't know: You can also get the HINSTANCE with
GetModuleHandle(NULL);
Am 25.12.2011 23:26, schrieb Tal:
I'm quite new to this language, could you please provide a short snippet of code
to clarify ?
--- a.d:
import std.stdio;
import b;
void main() {
writeln("some_var from Module b: \"", b.some_var, "\"");
}
--- b.d:
public string some_var = "Hello, world!";
I'm quite new to this language, could you please provide a short snippet of code
to clarify ?
Am 25.12.2011 22:37, schrieb Tal:
I want to save the hInstance of WinMain so I would be able to use it later in
some
other module. So how do I accomplish that ?
just define a public variable in the global scope.
I want to save the hInstance of WinMain so I would be able to use it later in
some
other module. So how do I accomplish that ?
You can't prototype D functions like that, they belong to a module.
test is built as _D1b4testFZAya, not _D1a4testFZAya (notice the module
names, a and b after _D1).
What exactly are you trying to do? DLLs?
Linking the following two files gives me a link-error:
a.d:
import std.stdio;
extern (D) string test ();
void main()
{
writeln(test());
readln();
}
b.d:
string test () {
On Sun, 25 Dec 2011 13:37:32 +0100, Mike Wey wrote:
> On 12/25/2011 09:25 AM, Adrian Mercieca wrote:
>> Hi folks,
>>
>> Is there a GetAndSet function (corresponding to cas (compare and set)
>> function) in D?
>>
>> Thanks.
>
> core.atomic.cas
>
> http://dlang.org/phobos/core_atomic.html#cas
I k
On 12/25/2011 09:25 AM, Adrian Mercieca wrote:
Hi folks,
Is there a GetAndSet function (corresponding to cas (compare and set)
function) in D?
Thanks.
core.atomic.cas
http://dlang.org/phobos/core_atomic.html#cas
--
Mike Wey
25.12.2011 0:48, Mr. Anonymous пишет:
Actually, when I think of it:
int a_orig = a++;
int[] arr_orig = arr[]++;
Should be read as:
int a_orig = a;
++a;
int[] arr_orig = arr[];
++arr[];
(If I'm not mistaken, it was written in the TDPL book)
Which means no copy of arr is made, and both arrays
Hi folks,
Is there a GetAndSet function (corresponding to cas (compare and set)
function) in D?
Thanks.
12 matches
Mail list logo