MattJayC

Q: Check if a number?

I though I understood checking if a value was number or not, but I am struggling to pass the info through the if statement.

 

property LChar : ""

set suffix to "_2"

try

  set LChar to (text of last character of suffix)

  set LChar to LChar as number

end try


 

 

if suffix is equal to "" then

  set suffix to "_main"

display dialog "A"

end if


 

if LChar is equal to number then

display dialog "B"

end if

Posted on Aug 25, 2016 4:32 AM

Close

Q: Check if a number?

  • All replies
  • Helpful answers