Re: [Harbour] Re: HB_LONG_LONG_OFF in OS/2

2008-01-21 Thread Guy Roussin

Hi,

With this code :
#!/usr/local/bin/hbrun
proc main()
? 1234567890123456789
? 12345678901234567890
return

i get these results (linux debian):
 1234567890123456789
 1234567890123457

strange no ?

Guy

David Arturo Macias Corona a écrit :

 > When HB_LONG_LONG_OFF was set then in nearly all places where it was
 > used I was emulating big numbers using double values so numerical
 > precission will be only one visible difference with some exceptions
 > when you reach some limits, f.e. LASTREC() with DBF with more then
 > 2GB records returns negative value with HB_LONG_LONG_OFF.
 > This is very simple code to check if it works:

 > proc main()
 > ? 1234567890123456789
 > return

 > Without HB_LONG_LONG_OFF this number is stored as double value
  ***
 > rounded to 53 bits precision and presented as:
 > 1234567890123457000
  ***


Sorry, with or without ? I got inverse


I get:

With HB_LONG_LONG_OFF:
( set C_USR=-DHB_LONG_LONG_OFF )

[E:\harbour801\bin]hbrun.exe test.prg

 1234567890123457000


Without HB_LONG_LONG_OFF:
( Rem  set C_USR=-DHB_LONG_LONG_OFF )

[E:\harbour801\bin]hbrun.exe test.prg

 1234567890123456789

David Macias



___
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: HB_LONG_LONG_OFF in OS/2

2008-01-21 Thread Przemyslaw Czerpak
On Mon, 21 Jan 2008, Guy Roussin wrote:
> Hi,
> With this code :
> #!/usr/local/bin/hbrun
> proc main()
> ? 1234567890123456789
> ? 12345678901234567890
> return
> i get these results (linux debian):
>  1234567890123456789
>  1234567890123457
> strange no ?

No, expected. 12345678901234567890 is too big to store in 64bit
signed integer and double value has to be used with smaller
(53bits only) precission.

best regards,
Przemek
___
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] *CRC32() Function

2008-01-21 Thread Mario H. Sabado

Hi Chen,

I tried compiling the myzip.prg from contrib\hbzlib and I got the 
following Unresolved external:

'_get_crc_table'
'_crc32'

What am I missing?

Thanks,
Mario

___
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


RE: [Harbour] *CRC32() Function

2008-01-21 Thread Jorge A. Giraldo

Mario,

Perhaps you are linking hrb.lib, the same happened to me, until I saw the 
readme.txt:

"zlib library (http://www.zlib.net/) wrapper functions"

I downloaded zlib1.dll

Made an:

implib zlib1.lib zlib1.dll 
 
This solved the problem.

Jorge A.

> Date: Tue, 22 Jan 2008 05:57:30 +0800
> From: [EMAIL PROTECTED]
> To: harbour@harbour-project.org
> Subject: Re: [Harbour] *CRC32() Function
> 
> Hi Chen,
> 
> I tried compiling the myzip.prg from contrib\hbzlib and I got the 
> following Unresolved external:
> '_get_crc_table'
> '_crc32'
> 
> What am I missing?
> 
> Thanks,
> Mario
> 
> ___
> Harbour mailing list
> Harbour@harbour-project.org
> http://lists.harbour-project.org/mailman/listinfo/harbour

_
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline___
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour