Jason Cunliffe wrote:

<SNIP>

> <wishlist examples>
>
> do %somescript.r
> do %image.png     ; runs a default implied "do/binary" refinement
>
> do/binary %image.png png-options
>
> png-options might load a config file "binary-png.r" similar to user.r for
> tuning the response of do/binary
>
> do/binary %tracks.midi midi-options would handle that format etc..
>
> </wishlist

As my example demonstrated, it is just an issue with nulls in the binary, all
other characters work fine.  I would'nt think a /binary switch would be
necessary, RT probably just needs to use a string functions that dont stop upon
reaching null characters.

Also, I haven't seen this in recent docs, but you can alternatively use <script>
tags to embed REBOL.  This is actually how I knew that it could be done.  When
trying to find docs on exactly how it worked, I ran across the block embedding
trick in the Core PDF. Anyway, here is an example using script tags.

test: ""
for I 1 255 1 [ append test to-char i ]
append test "^/<script>^/rebol[] confirm {test}^/</script>^/"
for I 0 255 1 [ append test to-char i ]
write/binary %test test
do %test

Note that the <script> tags are a bit pickier than the blocks, and must be
surounded by linefeeds.  Also, since the seemingly lack of docs on using tags, I
am suspicious if RT is going to discontinue tag capability.

--Ryan

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to