REBOL 3.0

PARSE: datatype of a COPY

Carl Sassenrath, CTO
REBOL Technologies
25-Sep-2009 18:49 GMT

Article #0251
Main page || Index || Prior Article [0250] || Next Article [0252] || 2 Comments || Send feedback

In a parse rule, what's the datatype of a COPY action?

In A83, it assumes it's the same datatype as the parse input. Take a look at these examples:

parse "test" [copy s to end (print type? s)]
string!
parse %test [copy s to end (print type? s)]
file!
parse http://test [copy s to end (print type? s)]
url!
parse #{3034} [copy s to end (print type? s)]
binary!
parse [a b] [copy s to end (print type? s)]
block!
parse 'a/b [copy s to end (print type? s)]
path!

This is a change from R2. But, is this what we want to do? The alternative is to use the datatypes base-type.

There are reasons either way. Which is the most useful for us?

2 Comments

REBOL 3.0
Updated 28-May-2017 - Edit - Copyright REBOL Technologies - REBOL.net