We are building a new experience for our SmartBear Community.
This site is now read-only. You can still browse and search as usual. Learn More

Forum Discussion

DainiusA's avatar
DainiusA
Contributor
5 years ago
Solved

split number into individual digits c# script and then use for loop

Hello,   I need a script to get me on the right road. I have a variable that parses a number from an SQL query example: 128 or 258 and any other combination possible.   I need to separate those n...
  • Marsha_R's avatar
    5 years ago

    You can convert that number to a string

    https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqconvert/index.html

     

    then pick the string apart for your coordinates

    https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqstring/index.html

     

    Then convert the separate coordinates back to numbers using aqconvert again.

     

    Try the examples and then with your numbers and let us know if you get stuck.