D: Declaring empty pointer variables that return address inside function calls?

BoQsc vaidas.boqsc at gmail.com
Thu Nov 23 19:22:22 UTC 2023


Is it possible to declare empty pointer variable inside function 
calls and pass its address to the function?

These are sometimes required while using Win32 - Windows 
Operating System API.

* Empty pointer variables are used by functions to return 
information after the function is done.

My own horrible **suggestion** of empty pointer declaration 
inside function call:
`someFunction(uint & passingEmptyVariableForWrite);`

What it would do:
* A new variable is declared inside function call.
* Address of that variable is passed to the function.
* After function is done, you can refer to it for returned value.


More information about the Digitalmars-d-learn mailing list