Star Script

Simplify Web Application Development

Introducing Star Script (5): Basic Examples 2

Example: Table

<table>
  for i = 1 to 3
    <tr>
       <td style="border:1px solid black;">i "*" 2 =</td> 
       <td style="border:1px solid black;">i*2</td> 
    </tr>
  next 
</table>

Output

1 * 2 = 2
2 * 2 = 4
3 * 2 = 6

Example: DoWhile Loop

var i = 1 
DoWhile i <= 3 
  we are at line i \n
  i = i + 1 
End

Output

we are at line 1 
we are at line 2 
we are at line 3
Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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: