0

How would one represent a literal string of binary data in hex in Red/System?

It's not possible to do this:

blah: #{F0909090F02060202070F010F080F0F010F010F09090F01010F080F010F0F080F090F0F010204040F090F090F0F090F010F0F090F09090E090E090E0F0808080F0E0909090E0F080F080F0F080F08080}
kealist
  • 1,669
  • 12
  • 26

1 Answers1

2

For now, using a string, one can encode literal bytes with escape notation "^(00)":

blah: "^(F0)^(90)^(90)^(90)^(F0)^(20)^(60)^(20)^(20)^(70)^(F0)^(10)^(F0)^(80)^(F0)^(F0)^(10)^(F0)^(10)^(F0)^(90)^(90)^(F0)^(10)^(10)^(F0)^(80)^(F0)^(10)^(F0)^(F0)^(80)^(F0)^(90)^(F0)^(F0)^(10)^(20)^(40)^(40)^(F0)^(90)^(F0)^(90)^(F0)^(F0)^(90)^(F0)^(10)^(F0)^(F0)^(90)^(F0)^(90)^(90)^(E0)^(90)^(E0)^(90)^(E0)^(F0)^(80)^(80)^(80)^(F0)^(E0)^(90)^(90)^(90)^(E0)^(F0)^(80)^(F0)^(80)^(F0)^(F0)^(80)^(F0)^(80)^(80)"
kealist
  • 1,669
  • 12
  • 26
  • 1
    Adding support for binary! literals in Red/System will be done as soon as binary! is supported by Red. – DocKimbel Feb 18 '14 at 12:52