Re: Pointer to environment.get

2023-08-30 Thread Vino via Digitalmars-d-learn
On Monday, 28 August 2023 at 10:27:07 UTC, Basile B. wrote: On Monday, 28 August 2023 at 10:20:14 UTC, Basile B. wrote: [...] To go further, the correct code for syntax you wanted to use is actually ```d alias Ext_T = string (const char[] a, string b); // define a function type alias Ext_

Re: Pointer to environment.get

2023-08-28 Thread Basile B. via Digitalmars-d-learn
On Monday, 28 August 2023 at 10:20:14 UTC, Basile B. wrote: On Monday, 28 August 2023 at 06:38:50 UTC, Vino wrote: Hi All, The the below code is not working, hence requesting your help. Code: ``` import std.stdio; import std.process: environment; void main () { int* ext(string) = &envir

Re: Pointer to environment.get

2023-08-28 Thread Basile B. via Digitalmars-d-learn
On Monday, 28 August 2023 at 06:38:50 UTC, Vino wrote: Hi All, The the below code is not working, hence requesting your help. Code: ``` import std.stdio; import std.process: environment; void main () { int* ext(string) = &environment.get("PATHEXT"); writeln(*ext); } ``` Problems is th

Pointer to environment.get

2023-08-27 Thread Vino via Digitalmars-d-learn
Hi All, The the below code is not working, hence requesting your help. Code: ``` import std.stdio; import std.process: environment; void main () { int* ext(string) = &environment.get("PATHEXT"); writeln(*ext); } ```