Re: new allocate_string functions

new topic     » goto parent     » topic index » view thread      » older message » newer message

Robert Craig wrote:
> 
> Igor Kachan wrote:
> > 
> > Hi, Dear EU users:
> > 
> > There is the allocate_string() function
> > in the standard RDS machine.e library.
> > 
> > Try please some variations on this theme:
> 
> OK, it's not quite as readable, but you've convinced me:
> 

Well if we are going to nit-pick then int_to_bytes() could be made 
faster if coded as ...

function int_to_bytes(atom a)
    poke4(mem,a)
    return peek({mem,4})
end function


and moved down after the 'mem=allocate(4)' line that's already there.

It all depends on if the function must always return INTEL-formatted
integers or not.

-- 
Derek Parnell
Melbourne, Australia

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu