# Math not working... var a:Number=1; a+1 = 11?

**URL:** <https://forum.kirupa.com/t/math-not-working-var-a-number-1-a-1-11/176618>\
**Category:** flash\
**Created:** [January 25, 2006, 3:39pm UTC](https://forum.kirupa.com/t/math-not-working-var-a-number-1-a-1-11/176618 "2006-01-25T15:39:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mickshake](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/mickshake/32/1353_2.png) [@mickshake](https://forum.kirupa.com/u/mickshake)\
**Post date:** [January 25, 2006, 3:39pm UTC](https://forum.kirupa.com/t/math-not-working-var-a-number-1-a-1-11/176618/1 "2006-01-25T15:39:23Z")

</div>

dbInfo is pulling totalRecords from a url encoded string.

in this case dbInfo.totalRecords = 12

I used totalRec to ensure that it is a number and not a string.

so using math, totalRect + 1 would be 13.

but instead, flash is returning 121

so it’s attaching a 1 to the end of the number(12), not adding it.

var totalRec:Number = dbInfo.totalRecords;  
for (d=1; d\<int(totalRec+1); d++) {

}

anyone ever expeirence this?
