Skip to content

[DOC] Table for to string etc.

hiiamboris edited this page Feb 10, 2024 · 3 revisions
  • Note: Github will not process the table width correctly, resulting in the sidebar obscuring a portion of this table. We are investigating workarounds. Use the bottom scrollbar to navigate the table.

String conversions

type expression to-string form mold mold/all

unset!

( )

error

empty string

unset

unset

none!

#(none)

error

none

none

#(none)

logic!

#(true)

true

true

true

#(true)

char!

#"a"

a

a

#"a"

#"a"

integer!

123

123

123

123

123

float!

123.456

123.456

123.456

123.456

123.456

percent!

50%

50%

50%

50%

50%

pair!

1x2

1x2

1x2

1x2

1x2

tuple!

1.2.3

1.2.3

1.2.3

1.2.3

1.2.3

date!

now/date

10-Jun-2018

10-Jun-2018

10-Jun-2018

10-Jun-2018

time!

now/time

21:07:47

21:07:47

21:07:47

21:07:47

word!

'abc

abc

abc

abc

abc

set-word!

quote abc:

abc

abc

abc:

abc:

lit-word!

quote 'abc

abc

abc

'abc

'abc

get-word!

quote :abc

abc

abc

:abc

:abc

refinement!

/abc

abc

abc

/abc

/abc

issue!

#abc

abc

abc

#abc

#abc

block!

[1 2 3]

123

1 2 3

[1 2 3]

[1 2 3]

paren!

quote (1 2 3)

123

1 2 3

(1 2 3)

(1 2 3)

hash!

make hash! [1 2 3]

123

1 2 3

make hash! …​

make hash! …​

path!

'a/b/c

a/b/c

a/b/c

a/b/c

a/b/c

lit-path!

quote 'a/b/c

'a/b/c

'a/b/c

'a/b/c

'a/b/c

set-path!

quote a/b/c:

a/b/c:

a/b/c:

a/b/c:

a/b/c:

get-path!

quote :a/b/c

:a/b/c

:a/b/c

:a/b/c

:a/b/c

string!

"abc"

abc

abc

"abc"

"abc"

file!

%abc.def

abc.def

abc.def

%abc.def

%abc.def

url!

http://abc.def

http://abc.def

http://abc.def

http://abc.def

http://abc.def

tag!

<a href="red-lang.org">

a href="red-lang.org"

<a href="red-lang.org">

<a href="red-lang.org">

<a href="red-lang.org">

email!

user@host.com

user@host.com

user@host.com

user@host.com

user@host.com

vector!

make vector! [1 2 3]

1 2 3

1 2 3

make vector! …​

make vector! …​

image!

make image! 2x2

make image! …​

make image! …​

make image! …​

make image! …​

binary!

#{313233}

123

#{313233}

#{313233}

#{313233}

bitset!

charset "abc"

make bitset! …​

make bitset! …​

make bitset! …​

make bitset! …​

map!

#[a: 1 b: 2]

a: 1 b: 2

a: 1 b: 2

#[ a: 1 b: 2 ]

#[ a: 1 b: 2 ]

object!

object [a: 1 b: 2]

a: 1 b: 2

a: 1 b: 2

make object! …​

make object! …​

error!

try [1 / 0]

* Math Error: …​

* Math Error: …​

make error! …​

make error! …​

native!

:if

?native?

?native?

make native! …​

make native! …​

action!

:add

?action?

?action?

make action! …​

make action! …​

op!

:+

?op?

?op?

make op! …​

make op! …​

function!

func [a b][a + b]

?function?

?function?

func[…​][…​]

func[…​][…​]

routine!

:event?

?routine?

?routine?

routine[…​][…​]

routine[…​][…​]

datatype!

action!

action

action

action!

action!

typeset!

number!

make typeset! …​

make typeset! …​

make typeset! …​

make typeset! …​

Clone this wiki locally