Page 1 of 1

how to convert number to string

Posted: July 10th, 2012, 5:16 am
by vanndy
Hello,

How can I convert number to string in logic code of entry form?

Regards,

Vanndy

Re: how to convert number to string

Posted: July 10th, 2012, 9:48 am
by Gregory Martin
There are two ways to do this, with the edit or maketext functions. For example, to get the value of pi to the thousandths place, you could write:
PROC GLOBAL

numeric pi = 3.14159265;
alpha piAsString;

// PROC ....

    piAsString =
edit("9.999",pi);
    
    
// or

    piAsString =
maketext("%0.3f",pi);