Simple Function Parameter question...

brian via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Oct 4 06:29:02 PDT 2016


On Tuesday, 4 October 2016 at 13:16:35 UTC, Adam D. Ruppe wrote:
> I'd put your repeated variables together in a struct, then pass 
> it around to the functions. At least then you pass just one 
> param at a time, without losing the info.

That's not a bad idea.
I have been creating "ids" to point to my structs and passing 
that around where needed, but in places it's still getting ugly, 
as they are sometimes more complicated than single vars, but it 
does the trick.
I might just get it to work the ugly way, and try pretty it up 
later. :P


More information about the Digitalmars-d-learn mailing list