Sven,
I don't follow you. In pointer form, the function can change the value of the variable in the larger scope. Protecting the value of the variable in the larger scope is the only reason I'm aware of for not always using pointer as the are much faster.

Please don't take my response as antagonistic. I may be misunderstanding the point of scoping?

Cheers,
Logan

Sent from Outlook Mobile

From: Sven Schreiber
Sent: Saturday, December 19, 9:39 AM
Subject: Re: [Gretl-devel] default values for matrices?
To: Gretl development

Am 19.12.2015 um 16:33 schrieb Logan Kelly: > Isn't this more a question of scope? If the pointer from is mandatory, > then the variable is forced to have a larger scope then perhaps the > script writer intends? Not that a poiter doesn't have advantages, but > why should the compiler force a larger scope? That seems in conflict > with the argument against global variables. > No I don't think so. The names of the variables are in general different inside and outside of the function, even though in pointer form they point to the same memory. You could also do "delete marg" right after completing the function call if you want to free that chunk of memory (I think). Which adds yet another line of code of course, which is my main mini-worry. cheers, sven _______________________________________________ Gretl-devel mailing list Gretl-devel@lists.wfu.edu http://lists.wfu.edu/mailman/listinfo/gretl-devel