Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Nathan on January 04, 2012, 08:45:52 am

Title: JScript convert string to int
Post by: Nathan on January 04, 2012, 08:45:52 am
I'm trying to convert a string to int using Jscript in the scripting window.  The standard conversion methods suggested by Microsoft in the JScript reference do not seem to be working.  Does EA implement some non-standard version of Jscript?  And if so, how do you type convert in it?  Thanks.
Title: Re: JScript convert string to int
Post by: Aaron B on January 04, 2012, 09:12:16 am
Nothing special that I am aware of.  What have you tried?  Have you tried using parseInt()?  Worked fine for me.

Code: [Select]
var i;
i = parseInt("123");