AppleScript Studio problems

Posted:
in Genius Bar edited January 2014
Am trying to compile an AppleScript Studio app using a math library which makes extensive use of less-than/greater-than-or-equal to signs. But the compiler seems to be choking on them. When I try to build it, it gives me a:

matematica.applescript:156: Expected ?then?, etc. but found unknown token. (-2741)

The line in qustion is:

if ex - exa ? 1.0E-15 and ex - exa ? -1.0E-15 then

If I go through and replace x ? 1 with x < 1 or x = 1, it compiles fine. Unfortunately this won't work in certain instances. I tried replacing all the ? and ? with <= and >=, but on save they are all changed back automatically (how helpful).



Are the ? ? the problem, or is it something else?



Thanks for any help.



Edit: looks like UBB chokes on them, anyway. Imagine the ?s are less-than-or-equal-to or greater-than-or-equal-to signs



[ 02-01-2003: Message edited by: wyntir ]</p>

Comments

  • Reply 1 of 2
    rodukroduk Posts: 706member
    I've never used AppleScript Studio, but I wonder whether some brackets would help, to force the compiler to apply the operators to the operands using the intended precedence. i.e.



    if ((ex - exa) ? (1.0E-15)) and ((ex - exa) ? (-1.0E-15)) then



    [ 02-01-2003: Message edited by: RodUK ]</p>
  • Reply 2 of 2
    neutrino23neutrino23 Posts: 1,562member
    I know it is a pain but have you tried spelling them out?



    greater than or equal



    This has worked more reliably for me though I can't say I've used either method a lot.
Sign In or Register to comment.