POV-Ray : Newsgroups : povray.general : Feature Request: Binary #write : Re: Feature Request: Binary #write Server Time
30 Jul 2024 16:14:19 EDT (-0400)
  Re: Feature Request: Binary #write  
From: Warp
Date: 26 Mar 2009 07:38:56
Message: <49cb6950@news.povray.org>
clipka <nomail@nomail> wrote:
> > You can already write byte values as #write(handle,chr(N)).

> .... no, you can't. Not reliably, that is. Ever tried? There's no way to get POV
> to #write a 0x00.

  The problem is that in C/C++ a string is ended with 0x00, and #write
does nothing else than output strings (rather than an array of bytes).

  The solution to that problem would be rather simple: Make it output
the array of bytes represented by the parameter, rather than writing it
as a string.

  (OTOH I don't know how povray internally handles string identifiers.
If it handles them as arrays of chars, with a separate length variable,
then there would be no problem.)

  But the proposed changes might be a better approach anyways.

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.