Why some function are class-less?

Jesse Phillips via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Nov 17 12:24:04 PST 2016


On Thursday, 17 November 2016 at 18:40:12 UTC, Suliman wrote:
> For example I need to write all logs to file. I see this 
> function, that seem set some global file name.
> "setLogFile 	Sets a log file for disk file logging."
>
> But would it name accessible from anywhere or it would be 
> visible inly from this scope? If yes is there any way to make 
> it's global?

It is going to be global if it is a free function and doesn't 
take/modify a logging object.


More information about the Digitalmars-d-learn mailing list