Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

ExtendScript Throws on Nested Ternary Operator

$
0
0

Just filed this bug with Adobe, but wondering if anyone else has run into this:

ExtendScript wasn't listed in the products list for submitting a bug, so that's why I'm using the After Effects bug form for this issue.

When attempting to use a nested ternary (AKA conditional) operatory in ExtendScript (`<test1 expression> ? <test2 expression> ? <if test2 true> : <if test2 false> : <if test1 false>`), it errors rather than running as it should.

 

Steps to Reproduce Bug:

1. Open ExtendScript

2. Paste the following into a new source file (don't include the backticks): `true ? true ? "one" : "two" : "three";`

3. Run the script

 

Results: Errors at second question mark ("?") with the error: "Expected: : "

 

Expected Results: Should have run successfully and returned "one".

 

I assume that this is an artifact of the implementation of ECMAScript-262 for ExtendScript, but I don't know. This shouldn't error though.

 

Originally posted this question here and was directed elsewhere.


Viewing all articles
Browse latest Browse all 2143

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>