Converting text to number

Jones Allen (Van) Allen.Jones@vpgroup.com
Fri, 19 Oct 2001 14:10:15 -0700


You can either assign it to a floating point item, or multiply it by a
scaling factor:

define d_float float*16 = nconvert("0.020")

define d_int   int*16 = nconvert("0.020") * 1000

In the "integer" example, you need to consider the scale every time you use
or print the value, eg:

report d_int pict "^^^.^^^"

-----Original Message-----
From: Jamie Harwood [mailto:jamie.harwood@caddock.com]
Sent: Friday, October 19, 2001 1:42 PM
To: powerh-l@lists.swau.edu
Subject: Converting text to number


Hi - perhaps I am missing something, but I am trying to get the correct
numeric value from a text field that may be something like 0.020. If I just
use NCONVERT, it returns 0. Any help? Thanks!

__________________________________________________
Jamie Harwood



= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.swau.edu
Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
Unsubscribe: "unsubscribe" in message body to
powerh-l-request@lists.swau.edu
http://lists.swau.edu/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.