1. 64 bit integers

Does Euphoria handle 64 bit ints.

My interest lies with mySQL and some of its return values are 64 bit.
Mostly these can be type cast in "C" to 32 bit integers.
I suppose what I am realy asking is:

Do I have to make an intermediary dll to convert 64 bit integers to 32 bit?

Thanks Richard

ps Yesterday was my first day working with Euphoria. It looks very promising,
if things go as well as they have so far I can see myself buying the c
converter.

new topic     » topic index » view message » categorize

2. Re: 64 bit integers

Richard Sanders wrote:
> 
> Does Euphoria handle 64 bit ints.
> 
> My interest lies with mySQL and some of its return values are 64 bit.
> Mostly these can be type cast in "C" to 32 bit integers.
> I suppose what I am realy asking is:
> 
> Do I have to make an intermediary dll to convert 64 bit integers to 32 bit?
> 
> Thanks Richard
> 
> ps Yesterday was my first day working with Euphoria. It looks very promising,
> if things go as well as they have so far I can see myself buying the c
> converter.

Are the return values themselves 64-bit integers, or are they pointers to 64-bit
integers?

If they are pointers, there is no reason you can't peek the values and convert
them to a 32 or 64-bit number (an atom, actually).

If the return values themselves are 64-bit ints on the stack then I'm not sure
how Euphoria would handle that.

--
"The author regrets that he is unable to reconcile himself to the
thoughtful point of view you have expressed. However, it must be kept
in mind that being raised in different cultures and different places can
result in such differences of viewpoint between individuals.
The author is from planet Earth." [author unknown]

j.

new topic     » goto parent     » topic index » view message » categorize

3. Re: 64 bit integers

Jason Gade wrote:
> 
> Richard Sanders wrote:
> > 
> > Does Euphoria handle 64 bit ints.
> > 
> > My interest lies with mySQL and some of its return values are 64 bit.
> > Mostly these can be type cast in "C" to 32 bit integers.
> > I suppose what I am realy asking is:
> > 
> > Do I have to make an intermediary dll to convert 64 bit integers to 32 bit?
> > 
> > Thanks Richard
> > 
> > ps Yesterday was my first day working with Euphoria. It looks very
> > promising,
> > if things go as well as they have so far I can see myself buying the c
> > converter.
> 
> Are the return values themselves 64-bit integers, or are they pointers to
> 64-bit
> integers?
> 
> If they are pointers, there is no reason you can't peek the values and convert
> them to a 32 or 64-bit number (an atom, actually).
> 
> If the return values themselves are 64-bit ints on the stack then I'm not sure
> how Euphoria would handle that.

The return values are 64 bit ints. mySQL handles databases > 2gig so 64 bit ints
are necessary.
As long as the DB is < 2gig converting to int does not loose the numeric value.

Euphoria doed need to be able to handle 64 bit ints/atoms if for nothing else
other than moving
the file pointer in an open file where the file is > 2gig or is expected to grow
past 2gig.

Cheers Richard

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu