Skip to content
Prev 188874 / 398500 Next

if confusion

On 4/08/2009, at 8:40 AM, rkevinburton at charter.net wrote:

            
The segment

if(tclass == "Testing 1 2 3")
{
     cat("Testing", tclass, "\n")
}

Is syntactically complete, so that when the parser comes to the  
``else'' it
finds it ``dangling'' and hence ``unexpected''.

The following wee adjustment works:

tclass <-  "Testing 1 2 3"
if(tclass == "Testing 1 2 3")
{
     cat("Testing", tclass, "\n")
} else {
     cat(tclass, "\n")
}

	cheers,

		Rolf Turner

######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}