Re: April CCXML: variable not declared in 6_3

Chris,

Thanks for your response.

I understand that there are ways to make the script "pass".

The problem is that the Specification states (8.2.1.1):

"It is illegal to make an assignment to a variable that has not been 
explicitly declared using <var> or a var statement within a <script>."

So even if you change the engine configuration this script breaks the 
CCXML specification.

I believe that it is necessary make this issue clean to avoid future 
problem: either to change the CCXML specification or to use the "STRICT" 
behavior in scripts.

So in fact this issue supports your previous comments regarding variable 
declaration in ECMA script.

Thanks,
Petr

-- 
   Petr Kuba, Project Manager
   OptimSys, s.r.o
   kuba@optimsys.cz
   Tel: +420 541 143 065
   Fax: +420 541 143 066
   http://www.optimsys.cz



On 27.5.2010 19:37, Chris Davis wrote:
> Petr,
>
> If you do not have "STRICT" as part of your javascript engine
> configuration this test will work
> as "loose" javascript does not require variables to be declared before
> assignment.
>
> If CCXML is going to require "STRICT" javascript I suggest that be
> stated clearly in the recommendation.
>
> Note there are some tricks you can do (that I have discussed before) to
> enforce/pass CCXML's declaration
> rules while not inside a <script> tag if you are running "LOOSE".
>
> I don't feel strongly one way or the other. However - if you accept that
> most javascript usage worldwide is
> inside people's web browsers than I can tell you almost none of those
> are "STRICT". If we mandate
> STRICT there is a potential for a lot of existing script to just not
> work inside CCXML, perhaps leading to
> a lower adoption rate of CCXML by a frustrated community.
>
> Regards,
> Chris
>
>
> Petr Kuba wrote:
>> Hello www-voice,
>>
>> In 6_3.txml, the 'result' variable is not declared in the
>> extractCurrentDir() function. I assume that it should be.
>>
>> Thanks,
>> Petr
>>
>
>

Received on Friday, 28 May 2010 06:51:34 UTC