Suggested addition for BRL.Blitz MemCompare()

BlitzMax Forums/BlitzMax Programming/Suggested addition for BRL.Blitz MemCompare()

JoshK(Posted 2008) [#1]
Function MemCompare:Int(a:Byte Ptr,b:Byte Ptr,size:Int)
Local n:Int
For n=0 To size-1
If a[n]<>b[n] Return False
Next
Return True
EndFunction


ImaginaryHuman(Posted 2008) [#2]
How is this useful for the general audience?


Brucey(Posted 2008) [#3]
Do you have a good reason for not calling C functions?


seyhajin(Posted 2008) [#4]
http://www.blitzbasic.com/Community/posts.php?topic=72077


MGE(Posted 2008) [#5]
How would using a function compared to adding it to the brl mod be any different in the compiled app?


Brucey(Posted 2008) [#6]
It wouldn't... apart from convenience, I suppose.
But I certainly wouldn't do it the way Leadwerks suggests.


JoshK(Posted 2008) [#7]
I did not know memcmp( src,with,size ) existed, but that is the same thing I am suggesting, and would probably be better method of acheiving it.

It just seemed like a common function that would be a useful addition.