The World’s First Sandbox Script

I have implemented <write>, <read>, <set> and <if> (at least in relation to the text type). <goto> and <label> also are implemented and work, but are not shown in the example.

<write new-line=””>Type in a word.</write>
<read text-name=”first word”/>
<write new-line=””>Type in another word.</write>
<read text-name=”second word”/>
<if text-name=”first word” comparison=”equals” compare-to=”$second word$”>
<write new-line=””>The strings are equal.</write>
<if text-name=”first word” comparison=”less” compare-to=”$second word$”>
<write new-line=””>$first word$ comes before $second word$.</write>
<if text-name=”first word” comparison=”greater” compare-to=”$second word$”>
<write new-line=””>$second word$ comes before $first word$.</write>
<read text-name=”dummy”/>


Tags: ,

One Response to “The World’s First Sandbox Script”

  1. John Hattan Says:

    Seems like an interesting exercise, but the syntax is pretty hard to read. I rather like the Flex method which stores more readable code in a cdata tag.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: