![]() |
||
| Home | SwiftForth Archive | SwiftX Archive | |

Glenn,
>(addr cnt--addr) that is reentrant and compatible with multiple threads?
This is seemingly impossible unless you are willing to allocate
>from the global memory pool another buffer and guarantee that the
program will eventually release it. Reason: you are asking for a
string of CNT+1 characters to fit into a buffer at ADDR which
is only guaranteed to be CNT characters long. If the input is the
address of a counted string in memory, you can use:
: $>Z ( c-addr -- z-addr )
DUP COUNT 2DUP + 1- >R OVER 1- SWAP CMOVE 0 R> C! ;
Rick
Received on Fri Oct 20 2000 - 11:48:35 PDT
This archive was generated by hypermail 2.2.0 : Thu Nov 20 2008 - 03:04:29 PST