This topic is locked
[SOLVED]

 calculate number value problem

2/5/2014 8:41:03 PM
ASPRunnerPro General questions
F
fsyeung author

When I using a calculation script to add two number, it was always get mix in a string like 1 + 1 = 11, how to solve it. thanks.
my script is below and table field type are number-integer

values("marktotal") = dict("mark") + dict("markadd") + dict("markothers")

Sergey Kornilov admin 2/5/2014

Convert your number using CBbl or CLng functions. By default everything is treated as strings.

values("marktotal") = CLng(dict("mark")) + CLng(dict("markadd")) + CLng(dict("markothers"))
F
fsyeung author 2/6/2014

thank you so much for your help