how to convert number to string

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
vanndy
Posts: 30
Joined: May 10th, 2012, 10:45 pm

how to convert number to string

Post by vanndy »

Hello,

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

Regards,

Vanndy
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: how to convert number to string

Post 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);
Post Reply