1

If I try writing this:

foo: "whatever"
bar: 0
if foo/1 <> as char! bar [
    ;-- stuff
]

Then I am told:

Compilation Error: invalid target type casting: char!

But if I omit the as char and write:

foo: "whatever"
bar: 0
if foo/1 <> as char! bar [
    ;-- stuff
]

Then it tells me:

Compilation Error: left and right argument must be of same type for: <>

How do I cast an INTEGER! to a CHAR! in Red/System?

1 Answers1

3

Currently there is no CHAR! datatype in Red/System.

The BYTE! datatype maybe what you would like to use.

Documentation: Red/System Datatypes

CSᵠ
  • 10,049
  • 9
  • 41
  • 64
Sonny
  • 182
  • 1
  • 1
  • 9