Star Script

Simplify Web Application Development

Introducing Star Script (4): Basic Examples 1

Let’s look at some simple Star Script examples

Example: Hello World!

Hello World!

Output

Hello World!

Example: Simple Expression

1 + 1

Output

2

Example: String Literal

"1 + 1"

Output

1 + 1

Example: Variable

var world = "my dear user"
Hello World!

Output

Hello my dear user!

Example: Assignment

var number as int
number = 1 + 1
number

Output

2

Example: Loop

for i = 1 to 3
  we are at line i \n
next

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: