Skip to main content
Bed30321077z973
Inspiring
November 1, 2023
Answered

convert string to int/float

  • November 1, 2023
  • 1 reply
  • 437 views

a=9 or "9" (not sure)

b= 4 or "4" (not sure=)

When summing them I am getting 49 or 94 instead of 13, you see..

How to ensure transforming them into numbers? When I tried int(a) I got the error: illegal use of int..

 

thanks

This topic has been closed for replies.

1 reply

Bruce Bullis
Community Manager
Bruce BullisCommunity ManagerCorrect answer
Community Manager
November 1, 2023
Bed30321077z973
Inspiring
November 1, 2023

I could have sweared I used that function earlier for ANOTHER use case and it got me an error, I had to stop it (I am still on visual + extenscript by the way), I will try it again just in case.

Edit: thanks it works!