Hi Steve,

you wrote:
>What really concerns me is how the string "REBOL Web" keeps getting
>into the output at the wrong spot. I inserted 'print statements after each
>assignment to see what data was being dealt with, and I cannot find out how
>s-tag is reading "REBOL Web" from a series that no longer has that string
as a
>member.

>> series: ["REBOL Web" some more stuff here]
== ["REBOL Web" some more stuff here]
>> next series
== [some more stuff here]
>> head next series
== ["REBOL Web" some more stuff here]

A series consists of a sequence of data with a current position index. The
current position index determines the position from which on the series is
exposed. There are functions that work on exposed series only, other
functions affect the sequence of data at the exposure position, and,
finally, a third group of functions affect the current position index and
thereby modify the position from which on the series is exposed.

The function next affects the current position index, not the sequence of
data:

>> index? next series
== 2

The function first operates on the exposed data sequence:

>> first series
== "REBOL Web"
>> first next series
== some

One possible way of solving your problem:

>> series: ["REBOL Web" a href http://www.rebol.com/ border 0]
== ["REBOL Web" a href http://www.rebol.com/ border 0]
>> series: next series
== [a href http://www.rebol.com/ border 0]

>> s-tag: build-tag copy series
== <a href="http://www.rebol.com/" border="0">

BTW, I think build-tag should respect the current position index and not
start building the tag from the head of the series. IMHO this is build-tag
bug. You should report it to feedback.

>I'd also like to note, for the record, that REBOL is _not_ that easy to
learn.
>I can program quite well in various BASIC's, PERL, JavaScript, C++, DCL (DEC
>Command Language), and various batch & shell scripts - yet I am having a
>dickens of a time learning REBOL! Maybe it would be much easier on me if
REBOL
>were my first language ...

Indeed it would. Your vast experience in numerous programming languages
leads you make assumptions about REBOL that are incorrect.

;- Elan >> [: - )]

Reply via email to