Re: Running safe.e ???
- Posted by jbrown105 at speedymail.org Sep 19, 2003
- 430 views
On Fri, Sep 19, 2003 at 12:43:54PM -0400, Bernie Ryan wrote: > > > Rob: Why does this fail ? Works fine under Linux, Eu 2.3 > Also will location a always contain a terminating zero ? Yes. From allocate_string() in safe.e, line 821: global function allocate_string(sequence s) -- create a C-style null-terminated string in memory atom mem mem = allocate(length(s) + 1) poke(mem, s & 0) return mem end function For an empty sequence, you get: mem = allocate(0 + 1) poke(mem, "" & 0) return mem > > =================================== > include safe.e > > atom a a = allocate_string("") > ? a > ? peek(a) > > if getc(0) then > -- pause > end if > =================================== > > Bernie > > > > TOPICA - Start your own email discussion group. FREE! > > -- "Is there peace in heaven, or is that merely an illusion?" - Someone