From wdunlap at tibco.com  Thu Sep  1 23:43:18 2011
From: wdunlap at tibco.com (William Dunlap)
Date: Thu, 1 Sep 2011 21:43:18 +0000
Subject: [Rd] "\088" is legal syntax?
Message-ID: <E66794E69CFDE04D9A70842786030B9304EE3E@PA-MBX04.na.tibco.com>

Is it intentional that the digit 8 is allowed
in octal escape sequences in character literals?

  > "\110" == "\088"
  [1] TRUE
  > "\8" == "\b"
  [1] TRUE

9's are rejected, so I'd expected 8's to be illegal as well.

  > "\9"
  Error: '\9' is an unrecognized escape in character string starting "\9"
  > "\091")
  Error: embedded nul in string: '\091'

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com 

> sessionInfo()
R version 2.13.1 (2011-07-08)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=C              LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base



[Rd] "\088" is legal syntax?
William Dunlap