Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: do %image.png

From: ryanc:iesco-dms at: 15-Nov-2001 9:37

<SNIP> > Are you saying REBOL "do" currently parses a binary automatically, and looks > for text containing script in a block ? > > ^/[REBOL[]print "here's looking at you from inside image.png"] > > I would be surprised and very delighted if this is true now. > Somebody show me an example please!
</SNIP> Yes this is true. Here is your example below. Unfortuneately I could not find any good binary candidates because they had nulls in the beginnings, so I just demonstrated at the console.
>> test: ""
== ""
>> for I 1 255 1 [ append test to-char i ] ; Must skip null because of bug.
== {^A^B^C^D^E^F^G^H^- ^K^L^M^N^O^P^Q^R^S^T^U^V^W^X^Y^Z^[^\^]^!^_ !"#$%&'()*+,-./0123456789:;<=>?@A BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^^_`...
>> code: "^/[rebol[] confirm {test}]"
== "^/[rebol[] confirm {test}]"
>> append test code
== {^A^B^C^D^E^F^G^H^- ^K^L^M^N^O^P^Q^R^S^T^U^V^W^X^Y^Z^[^\^]^!^_ !"#$%&'()*+,-./0123456789:;<=>?@A BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^^_`...
>> for I 0 255 1 [ append test to-char i ] ; Can have nulls after the code.
== {^A^B^C^D^E^F^G^H^- ^K^L^M^N^O^P^Q^R^S^T^U^V^W^X^Y^Z^[^\^]^!^_ !"#$%&'()*+,-./0123456789:;<=>?@A BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^^_`...
>> write/binary %test test >> do %test
== true
>>
My recommendation is to just write a function that would works like 'do is supposed to. This way when RT fixes the bug you can just switch over to using 'do. --Ryan