Suggested addition for BRL.Blitz MemCompare()
BlitzMax Forums/BlitzMax Programming/Suggested addition for BRL.Blitz MemCompare()
| ||
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 |
| ||
How is this useful for the general audience? |
| ||
Do you have a good reason for not calling C functions? |
| ||
http://www.blitzbasic.com/Community/posts.php?topic=72077 |
| ||
How would using a function compared to adding it to the brl mod be any different in the compiled app? |
| ||
It wouldn't... apart from convenience, I suppose. But I certainly wouldn't do it the way Leadwerks suggests. |
| ||
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. |