1. Faster peek_ustring() function

This is a faster peek_ustring() function than that in machine.e on SourceForge

global function peek_ustring(atom addr)
atom ptr
	ptr = addr
	while peek2u(ptr) do
		ptr += 2
	end while
	
	return peek2u({addr, (ptr - addr) / 2})
end function


Larry Miller

new topic     » topic index » view message » categorize

2. Re: Faster peek_ustring() function

Larry Miller wrote:
> This is a faster peek_ustring() function than that in machine.e on SourceForge
> 
> }}}
<eucode>
> global function peek_ustring(atom addr)
> atom ptr
> 	ptr = addr
> 	while peek2u(ptr) do
> 		ptr += 2
> 	end while
> 	
> 	return peek2u({addr, (ptr - addr) / 2})
> end function
> </eucode>
{{{


What a smart solution! Thanks!

I have updated it and committed it to the SVN.

But I do not know how to put author in the source code so I didn't put your
name.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu