Does 'ref' turn into a pointer during compile time?

2022-12-21 Thread thebluepandabear via Digitalmars-d-learn
Say you have the following function that takes in a `ref` parameter: ```D void modify(ref int num) { num += 5; } ``` Does the compiler turn that into the code below? ```D void modify(int* num) { num += 5; } ``` I was just wondering whether or not this is the case because I don't thin

Re: Does 'ref' turn into a pointer during compile time?

2022-12-21 Thread H. S. Teoh via Digitalmars-d-learn
On Thu, Dec 22, 2022 at 12:43:28AM +, thebluepandabear via Digitalmars-d-learn wrote: > Say you have the following function that takes in a `ref` parameter: > > ```D > void modify(ref int num) { > num += 5; > } > ``` > > Does the compiler turn that into the code below? > > ```D > void m

in dub single file build how to pass "-J" options?

2022-12-21 Thread mw via Digitalmars-d-learn
I have example.d: ``` #!/usr/bin/env dub /+dub.sdl: dependency "tkd" version="~>1.1.14" +/ ... ``` $ dub build --single example.d ... Error: need `-J` switch to import text file `folder_page.png` I'm wondering how to pass "-J" options? BTW, for such single file build, do I have to use dub

Re: in dub single file build how to pass "-J" options?

2022-12-21 Thread mw via Digitalmars-d-learn
On Thursday, 22 December 2022 at 02:19:23 UTC, mw wrote: I have example.d: ``` #!/usr/bin/env dub /+dub.sdl: dependency "tkd" version="~>1.1.14" +/ ... ``` $ dub build --single example.d ... Error: need `-J` switch to import text file `folder_page.png` I'm wondering how to pass "-J" option

Re: in dub single file build how to pass "-J" options?

2022-12-21 Thread rikki cattermole via Digitalmars-d-learn
stringImportPaths

Re: Does 'ref' turn into a pointer during compile time?

2022-12-21 Thread Ali Çehreli via Digitalmars-d-learn
On 12/21/22 16:43, thebluepandabear wrote: > Say you have the following function that takes in a `ref` parameter: > > ```D > void modify(ref int num) { > num += 5; > } > ``` > > Does the compiler turn that into the code below? > > ```D > void modify(int* num) { > num += 5; Rather: *n