Skip to content
Prev 57380 / 63424 Next

Conventions: Use of globals and main functions

That is unfortunately wrong, though. Whether the script runs as "main"
and whether R is in interactive mode are independent properties. I
guess most of the time it works, because _usually_ you run the whole
script (main()) in non-interactive mode, and source() it in
interactive mode, but this is not necessarily always the case, e.g.
you might want to source() in non-interactive mode to run some tests,
or use the functions of the script in another script, in which cases
you don't want to run main().

G.

On Sun, Aug 25, 2019 at 11:47 PM Cyclic Group Z_1
<cyclicgroup-z1 at yahoo.com> wrote:
[...]

Thread (21 messages)

Cyclic Group Z_1 Conventions: Use of globals and main functions Aug 24 Gábor Csárdi Conventions: Use of globals and main functions Aug 24 Duncan Murdoch Conventions: Use of globals and main functions Aug 25 Cyclic Group Z_1 Conventions: Use of globals and main functions Aug 25 Cyclic Group Z_1 Conventions: Use of globals and main functions Aug 25 Duncan Murdoch Conventions: Use of globals and main functions Aug 25 Gábor Csárdi Conventions: Use of globals and main functions Aug 26 Cyclic Group Z_1 Conventions: Use of globals and main functions Aug 26 William Dunlap Conventions: Use of globals and main functions Aug 26 Duncan Murdoch Conventions: Use of globals and main functions Aug 26 Martin Maechler Conventions: Use of globals and main functions Aug 27 Peter Meissner Conventions: Use of globals and main functions Aug 27 Abby Spurdle Conventions: Use of globals and main functions Aug 27 Abby Spurdle Conventions: Use of globals and main functions Aug 27 Henrik Bengtsson Conventions: Use of globals and main functions Aug 27 Cyclic Group Z_1 Conventions: Use of globals and main functions Aug 27 Cyclic Group Z_1 Conventions: Use of globals and main functions Aug 27 Peter Meissner Conventions: Use of globals and main functions Aug 28 Cyclic Group Z_1 Conventions: Use of globals and main functions Aug 28 Peter Meissner Conventions: Use of globals and main functions Aug 28 Cyclic Group Z_1 Conventions: Use of globals and main functions Aug 28