mem_set
| Definition: | mem_set(atom addr, integer byte, integer n) |
| Description: | Set n bytes of memory, starting at address addr, to the value of byte. |
| pwa/p2js: | Not supported. |
| Comments: | The low order 8 bits of byte are actually stored in each byte.
mem_set(addr, byte, n) is equivalent to: poke(addr, repeat(byte, n)) but is much faster. |
| Example: |
destination = allocate(1000) mem_set(destination, ' ', 1000) -- 1000 consecutive bytes in memory will be set to 32 -- (the ASCII code for ' ') |
| Implementation: | via :%opMemSet in builtins\VM\pMem.e (an autoinclude) - be warned however it is low-level complicated stuff that you do not need to know. |
| See Also: | mem_copy, peek, poke, allocate |