Convert text file to integers

New Here ,
May 06, 2022 May 06, 2022

Copy link to clipboard

Copied

I have a text file with numbers in it. So what I want to know is this.

How can i convert them into integers?

Views

123

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
May 07, 2022 May 07, 2022

Copy link to clipboard

Copied

Hi.

 

In AS3 or HTML5 Canvas?

 

Regards,

JC

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 08, 2022 May 08, 2022

Copy link to clipboard

Copied

LATEST

In AS3

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
May 07, 2022 May 07, 2022

Copy link to clipboard

Copied

If it is ActionScript, you can type cast the string to be a number. This for example:

trace("123"+4);

will give you "1234". But this:

trace(Number("123")+4);

will give you 127.

For HTML5 Canvas you can use JavaScript functions to get the same results. So,:

alert("123"+4);

will show "1234", but:

alert(parseInt("123")+4);

will show 127.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines