David Reche · Apr 24, 2017

Constant string with quote throw Missing closing quotation mark in Atelier


Working with Atelier a valid COS sentence like this:

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


Throws Missing closing quotation mark error. Any workaround?


0 1,590
Discussion (11)1
Log in or sign up to continue

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.


I didn't saw that option

Thanks for this "double" lesson ;-)

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)=""""

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

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

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

As second argument defaults to 1 and third can be skipped you can write just:

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