updating oE poke_wstring


include machine.e 
namespace machine 
public function poke_wstring(atom buffaddr, integer buffsize, sequence s) 

stores a C-style null-terminated Double-Byte string in memory.

  1. buffaddr: an atom, the RAM address to to the string at.
  2. buffsize: an integer, the number of bytes available, starting from buffaddr.
  3. s : a sequence, the string to store at address buffaddr.
  • This does not allocate an RAM. You must supply the preallocated area.
  • This uses two bytes per string character. Note that buffsize is the number of bytes available in the buffer and not the number of characters available.
  • If s is not a double-byte string, nothing is stored and a zero is returned.

An atom. If this is zero, then nothing was stored, otherwise it is the address of the first byte after the stored string.

Example 1:
 atom title 
title = allocate(1000) 
if poke_wstring(title, 1000, "The Wizard of Oz") then 
    -- successful 
    -- failed 
end if 
See Also:

Using Strings, allocate, allocate_wstring

Not Categorized, Please Help


Quick Links

User menu

Not signed in.

Misc Menu