ARDUINO MEGA Functions Miscellaneous
(→memcmp) |
(→memcmp) |
||
| Line 93: | Line 93: | ||
| class="functionType"| <span class="bigKeywordBI">intrinsic short </span><span class="bigKeywordB">memcmp</span><span class="bigCodePunc">(</span><span class="bigKeywordBI">void </span><span class="bigCodeBasic">&pToBuffer</span><span class="bigCodePunc">, </span><span class="bigKeywordBI">const short</span><span class="bigCodeBasic">nValue</span><span class="bigCodePunc">, </span><span class="bigKeywordBI">const short </span><span class="bigCodeBasic">nNumbOfBytes</span><span class="bigCodePunc">)</span> | | class="functionType"| <span class="bigKeywordBI">intrinsic short </span><span class="bigKeywordB">memcmp</span><span class="bigCodePunc">(</span><span class="bigKeywordBI">void </span><span class="bigCodeBasic">&pToBuffer</span><span class="bigCodePunc">, </span><span class="bigKeywordBI">const short</span><span class="bigCodeBasic">nValue</span><span class="bigCodePunc">, </span><span class="bigKeywordBI">const short </span><span class="bigCodeBasic">nNumbOfBytes</span><span class="bigCodePunc">)</span> | ||
|- | |- | ||
| − | | style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;"|([[Data_Types#dataType_void|void]]) | + | | style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;"|([[Data_Types#dataType_void|void]]) Compares the first set bytes of the block of memory referenced by "pToBuffer" to the first number of bytes referenced by "pFromBuffer". The function will return zero if they all match or a value different from zero representing which is greater if they do not. |
|- | |- | ||
| | | | ||
| Line 102: | Line 102: | ||
|- | |- | ||
| style="border-style: solid; border-width: 1px 0px 1px 0px"|''pToBuffer'' | | style="border-style: solid; border-width: 1px 0px 1px 0px"|''pToBuffer'' | ||
| − | | style="border-style: solid; border-width: 1px 0px 1px 0px"|buffer to | + | | style="border-style: solid; border-width: 1px 0px 1px 0px"|First buffer to compare. |
| style="border-style: solid; border-width: 1px 0px 1px 0px"|[[Data_Types#dataType_void|void]] | | style="border-style: solid; border-width: 1px 0px 1px 0px"|[[Data_Types#dataType_void|void]] | ||
|- | |- | ||
| style="border-style: solid; border-width: 0px 0px 1px 0px"|''pFromBuffer'' | | style="border-style: solid; border-width: 0px 0px 1px 0px"|''pFromBuffer'' | ||
| − | | style="border-style: solid; border-width: 0px 0px 1px 0px"|buffer to | + | | style="border-style: solid; border-width: 0px 0px 1px 0px"|Second buffer to compare. |
| style="border-style: solid; border-width: 0px 0px 1px 0px"|[[Data_Types#dataType_void|void]] | | style="border-style: solid; border-width: 0px 0px 1px 0px"|[[Data_Types#dataType_void|void]] | ||
|- | |- | ||
| style="border-style: solid; border-width: 0px 0px 0px 0px"|''nNumbOfBytes'' | | style="border-style: solid; border-width: 0px 0px 0px 0px"|''nNumbOfBytes'' | ||
| − | | style="border-style: solid; border-width: 0px 0px 0px 0px"| | + | | style="border-style: solid; border-width: 0px 0px 0px 0px"|Number of bytes to compare |
| style="border-style: solid; border-width: 0px 0px 0px 0px"|[[Data_Types#dataType_short|short]] | | style="border-style: solid; border-width: 0px 0px 0px 0px"|[[Data_Types#dataType_short|short]] | ||
|- | |- | ||
Revision as of 18:34, 9 May 2012
ARDUINO → Functions and Variables → ARDUINO MEGA Functions Miscellaneous
|
| |||||||
memcpy
| void memcpy(void &pToBuffer, const void &pFromBuffer, const short nNumbOfBytes) | ||||||||||||
| (void) Function copies characters from pFromBuffer to pToBuffer. nBytesToCopy is the number of bytes to copy. Identical to the function found in conventional C 'string.h' library. | ||||||||||||
| ||||||||||||
|
memset
| void memset(void &pToBuffer, const short nValue, const short nNumbOfBytes) | ||||||||||||
| (void) Sets a block of memory at pToBuffer to the value nValue. nNumbOfBytes is the number of bytes to set. This is a useful function for initializing the value of an array to all zeros. Identical to the function found in conventional C 'string.h' library. | ||||||||||||
| ||||||||||||
|
memcmp
| intrinsic short memcmp(void &pToBuffer, const shortnValue, const short nNumbOfBytes) | ||||||||||||
| (void) Compares the first set bytes of the block of memory referenced by "pToBuffer" to the first number of bytes referenced by "pFromBuffer". The function will return zero if they all match or a value different from zero representing which is greater if they do not. | ||||||||||||
| ||||||||||||
|
memset
| void memset(void &pToBuffer, const short nValue, const short nNumbOfBytes) | ||||||||||||
| (void) Sets a block of memory at pToBuffer to the value nValue. nNumbOfBytes is the number of bytes to set. This is a useful function for initializing the value of an array to all zeros. Identical to the function found in conventional C 'string.h' library. | ||||||||||||
| ||||||||||||
|