tags:

views:

49

answers:

2
<html>
<header>
</header>
<body>
<div class='rebol'>
<pre>
Rebol [
    Title: "rebol script embedded in html"
    Author-Url: <a href=http://reboltutorial.com/blog/protect-rebol-script-with-php/&gt;http://reboltutorial.com/blog/protect-rebol-script-with-php/&lt;/a&gt;
    Script-Url:  <a href=http://reboltutorial.com/source/rebolscriptembedded.html&gt;http://reboltutorial.com/source/rebolscript.html&lt;/a&gt;
    Date:  24-Aug-2009
    Purpose: {
            demo of rebol script embedded in html
    }
]
ask "You're successfull!"
</pre>
</div>
</body>

If tested in Rebol's Console this gives

>> do read clipboard://
You're successfull!
== </body>
>>

Why does it return and how to prevent this if possible ?

+1  A: 

<header> is not a valid HTML tag. You mean <head>

pavium
Oops I don't do enough html by hand :)
Rebol Tutorial
+1  A: 

First: a REBOL script starts with the REBOL [...] header, so everything up to this header will be ignored by the REBOL interpreter. Second: tags are a valid datatype in REBOL. So upon executing your example script, there are three more values following the ask ... expression and the last of those values (</body>) will be returned as the result of your script.

To prevent this, you can add a quit where you want your script to end, i.e. after the ask expression in your example.

earl
Thanks, will correct my script.
Rebol Tutorial