My understanding is that pure is used for compiler optimization
in loops and expressions. It leaves out multiple calls if it
figures out it is not needed.
Is pure used for anything else?
int * pureFunction()
1) the pointer needs to be the same.
2) the value that the pointer points to needs
On Wednesday, 24 November 2021 at 20:29:36 UTC, Imperatorn wrote:
On Wednesday, 24 November 2021 at 17:38:42 UTC, BoQsc wrote:
On Wednesday, 24 November 2021 at 17:29:09 UTC, Adam D Ruppe
wrote:
On Wednesday, 24 November 2021 at 17:23:07 UTC, BoQsc wrote:
The many times I tried this pragma, it
On Wednesday, 24 November 2021 at 17:38:42 UTC, BoQsc wrote:
On Wednesday, 24 November 2021 at 17:29:09 UTC, Adam D Ruppe
wrote:
On Wednesday, 24 November 2021 at 17:23:07 UTC, BoQsc wrote:
The many times I tried this pragma, it did not even get
recognised as pragma at all.
You need to use
Since the **linkerDirective pragma** is not supported for OMF
object file.
Linker directives are only supported for MS-COFF output.
https://dlang.org/spec/pragma.html#linkerDirective
I doubt that this thread is completely resolved.
On Wednesday, 24 November 2021 at 17:38:42 UTC, BoQsc wrote:
[...]
**The obvious problem now is:** How can you compile without
specifying the flags. With plain dmd.
It probably has to do something with the default target of dmd
(`-m32`) generating **OMF object file**.
On Wednesday, 24 November 2021 at 17:29:09 UTC, Adam D Ruppe
wrote:
On Wednesday, 24 November 2021 at 17:23:07 UTC, BoQsc wrote:
The many times I tried this pragma, it did not even get
recognised as pragma at all.
You need to use `dmd -m32mscoff` or `dmd -m64`. Plain `dmd`
won't work.
If
On Wednesday, 24 November 2021 at 17:23:07 UTC, BoQsc wrote:
The many times I tried this pragma, it did not even get
recognised as pragma at all.
You need to use `dmd -m32mscoff` or `dmd -m64`. Plain `dmd` won't
work.
If -m32mscoff and -m64 still don't work, what's your dmd version?
It was
On Wednesday, 24 November 2021 at 17:14:42 UTC, Adam D Ruppe
wrote:
On Wednesday, 24 November 2021 at 17:06:21 UTC, BoQsc wrote:
**The question:** Is there a way to include the `.def` file
instructions inside `.d` file, so that there won't be a need
for additional `.def` file when compiling.
On Wednesday, 24 November 2021 at 17:14:42 UTC, Adam D Ruppe
wrote:
https://dlang.org/spec/pragma.html#linkerDirective
example from my stuff:
import arsd.minigui;
pragma(linkerDirective, "/subsystem:windows");
pragma(linkerDirective, "/entry:mainCRTStartup");
that works with dmd
On Wednesday, 24 November 2021 at 17:06:21 UTC, BoQsc wrote:
**The question:** Is there a way to include the `.def` file
instructions inside `.d` file, so that there won't be a need
for additional `.def` file when compiling. (`dmd winsamp`)
https://dlang.org/spec/pragma.html#linkerDirective
I'm not sure if I have sucessfully achieved something like this
before or is it even possible right now, but there is a sample
file that comes with DMD compiler: `D\dmd2\samples\d\winsamp.d`
**The problem:** `winsamp.d` have to be compiled with `.def` file.
```
/+ Compile with:
+ dmd winsamp
On Thursday, 11 July 2019 at 08:53:35 UTC, BoQsc wrote:
https://dlang.org/phobos/std_windows_registry.html
https://github.com/dlang/phobos/blob/master/std/windows/registry.d
Can someone provide some examples on how to:
set, change, receive something from the Windows registry using
Phobos
On Tue, 2021-11-23 at 21:00 +, Imperatorn via Digitalmars-d-learn
wrote:
> On Tuesday, 23 November 2021 at 18:00:16 UTC, Luís Ferreira wrote:
> > On Tue, 2021-11-23 at 17:36 +, Imperatorn via
> > Digitalmars-d-learn wrote:
> > > On Tuesday, 23 November 2021 at 14:01:15 UTC, Adam D Ruppe
On Friday, 19 November 2021 at 17:36:55 UTC, BoQsc wrote:
Let's say I want to write a simple program that asks for an
input of a single character.
After pressing a single key on a keyboard, the character is
printed out and the program should stop.
module test;
void main()
{
import
14 matches
Mail list logo