[Rd] R CMD BATCH on scripts without trailing newline
Jan T. Kim
jtk at cmp.uea.ac.uk
Thu Sep 1 14:57:39 CEST 2005
On Thu, Sep 01, 2005 at 01:39:52PM +0200, Martin Maechler wrote:
> >> getwd()proc.time()
> StEgl> Error: syntax error Execution halted $
>
> aahh, now I finally understand via some people append
> those **ugly** unneeded ';' to the end of almost every line of R
> code. It would have helped here
> :-) :-)
What is the problem with the semicolons? Ugliness is in the eye of
the beholder, evidently, but on a more objective level, terminating
statements by an explicit and visible separator seems like a very
reasonable idea to me.
> StEgl> Is it worth changing the BATCH script so that it adds
> StEgl> a newline before adding the call to proc.time()?
>
> Yes I think it would be. This is trivial, at least for
> <Rsrc>/src/scripts/BATCH
> Slightly better but more tricky: only append a newline "when needed".
> Any idea for that?
I think this is a dangerous direction of thought. Having a "terminator
if apparently needed" semantics of newline has already brought us the
inconsistency of if / else parsing inside and outside of blocks. No more
of that, please.
Best regards, Jan
--
+- Jan T. Kim -------------------------------------------------------+
| *NEW* email: jtk at cmp.uea.ac.uk |
| *NEW* WWW: http://www.cmp.uea.ac.uk/people/jtk |
*-----=< hierarchical systems are for files, not for humans >=-----*
More information about the R-devel
mailing list