Dear OxUsers,

I have problems in converting text values to numbers.
For example, the following program does not print 70 as a number but prints 55 instead.


#include <oxstd.h>


main()


{

       
decl sVarName= "TV70.coef";

        decl indx = strifindr(sVarName, '9'~'8'~'7'~'6'~'5'~'4'~'3'~'2'~'1'~'0');

        decl carryover = sVarName[selectifc(indx, indx .>0)]         ;

        print("string carryover = ", carryover, "\n");

        print("integer carryover = ", int(carryover), "\n");
}


// which produces:

// string carryover = 70

// integer carryover = 55

Could you please indicate what am I doing wrong and how can I convert text values to the numerical format (whether there is a function that does this conversion otherwise)?


Regards,


Poppy