XtoC() with Numeric

81 views
Skip to first unread message

Mario H. Sabado

unread,
May 31, 2012, 10:33:06 PM5/31/12
to harbou...@googlegroups.com
Hi,

I tested the XtoC() function using numeric parameter but doesn't return
the expected value. Logical, Char and Date parameters works fine
though. Maybe this is a bug or Numeric type conversion is not covered
with the above function?

Thanks,
Mario

Massimo Belgrano

unread,
Jun 1, 2012, 5:53:53 AM6/1/12
to harbou...@googlegroups.com
Post a sample

2012/6/1 Mario H. Sabado <mhsa...@gmail.com>


--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-users+unsubscribe@googlegroups.com
Web: http://groups.google.com/group/harbour-users



--
Massimo Belgrano

Mario H. Sabado

unread,
Jun 1, 2012, 6:17:24 AM6/1/12
to harbou...@googlegroups.com
Hi Massimo,  please find below sample:

function test
local x
x:=1.25
? XtoC(x) //displays ascii characters
x:="1.25"
? XtoC(x) //displays "1.25" string value
x:=date()

? XtoC(x) //displays YYYYMMDD date value
return nil

Thanks,
Mario

On 6/1/2012 5:53 PM, Massimo Belgrano wrote:
Post a sample

2012/6/1 Mario H. Sabado <mhsa...@gmail.com>
Hi,

I tested the XtoC() function using numeric parameter but doesn't return the expected value.  Logical, Char and Date parameters works fine though.  Maybe this is a bug or Numeric type conversion is not covered with the above function?

Thanks,
Mario


--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.

Przemysław Czerpak

unread,
Jun 1, 2012, 6:25:19 AM6/1/12
to harbou...@googlegroups.com
On Fri, 01 Jun 2012, Mario H. Sabado wrote:

Hi Mario,

> function test
> local x
> x:=1.25
> ? XtoC(x) //displays ascii characters
> x:="1.25"
> ? XtoC(x) //displays "1.25" string value
> x:=date()
> ? XtoC(x) //displays YYYYMMDD date value
> return nil

It's expected CT3 compatible behavior.
XTOC() converts numeric values to strings with
binary representation of IEEE758 double value.

best regards,
Przemek

Mario H. Sabado

unread,
Jun 1, 2012, 2:37:20 PM6/1/12
to harbou...@googlegroups.com
Hi Przemek,
Many thanks for the elaboration of the function behavior using numeric
parameter.

Best regards,
Mario
Reply all
Reply to author
Forward
0 new messages