Constant string with quote throw Missing closing quotation mark in Atelier

Atelier

Hi,

Working with Atelier a valid COS sentence like this:

if $e(chunk,1,1)="""{

}

Throws Missing closing quotation mark error. Any workaround?

Thanks

 

  • 0
  • 0
  • 583
  • 5
  • 4

Answers

If you're trying to check that the first character is " then you need to double the quotes. In other words, test as follows:

if $e(chunk,1,1)=""""

I originally posted this to the Google groups cross post and was informed that it would not be seen unless posted here.

Try
if $e(chunk,1,1)=""""{
}

A double quote character is represented by two double quote characters when inside a quoted segment. So:

write """  ; is invalid
write """"  ; produces
"

Comments

That's because it's not valid COS syntax :) You need """"

In that case @David Reche, please accept either Dmitry's answer or mine by clicking the checkmark alongside it. The screenshot below shows you what to look for:

John, it seems that inquiring folks rarely accept answers, maybe because of their rare visits to this site.

With voting feature (like some sites have) it would be possible to "auto-accept" the most voted answer(s) after some reasonable time, e.g. after two weeks.

Done!

I didn't saw that option

Thanks for this "double" lesson ;-)