pointers, assignments, Garbage Collection Oh My?
Jonathan M Davis
jmdavisProg at gmx.com
Wed Jul 10 12:55:44 PDT 2013
On Wednesday, July 10, 2013 20:38:40 JohnnyK wrote:
> Reminds me of how Delphi (aka Pascal) strings are work. Thanks
> everyone this answers some of my questions. Now what about when
> the return type of a function is a string? Is D returning the
> pointer to the string structure or is it returning the structure?
Absolutely everywhere that you see an array (or string) in code, it's really
the struct underneath the hood. In no case is just a pointer passed, since a
pointer would not be an array. To get a pointer to the array's data, you have
to use its ptr property.
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list