Converting string to number

I have read http://www.amibroker.com/guide/afl/strtonum.html and don't quite understand how this works or what to do with it. I am pretty sure however this is what I need to solve a problem I am having in an exploration I am trying to write. Could someone explain this in a little more depth or at least point me in a direction to find more specifics about how this works? As it pertains to my issue, I am using StaticVarGetText to bring data into the exploration (which if I understand would be a string) and I need to convert it to numbers (array) so that I can filter it properly for the exploration.

Hi Mark,

in the end it is simply this: If you have a string "10" you are not able to do calculations with it. So you use StrToNum() to convert "10" to an actual number which you can use for calculations. Just try it with some additional column in which you calculate sth. with the content of your other columns.

2 Likes

OK I did that...evidently I was making it much more difficult than it really was....Thanks @RioL

1 Like

Just one more hint: Depending on your use of this number, it might be worth checking your previous formulas. Maybe it makes sense to change the string earlier, to make the whole handling of it easier in all consecutive formulas.

2 Likes