Hello,
How can I convert number to string in logic code of entry form?
Regards,
Vanndy
how to convert number to string
-
- Posts: 1796
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: how to convert number to string
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);
numeric pi = 3.14159265;
alpha piAsString;
// PROC ....
piAsString = edit("9.999",pi);
// or
piAsString = maketext("%0.3f",pi);