FANDOM


EDIT 1 We will learn about variables.

Try this code:

set a to 6

display dialog a

that should display 6.

What it does is set the variable a to 6. Then it displays a, or rather 6.

You can also change existing vars (variables)...

set a to 2

display dialog a

--should display 2

set a to 5

display dialog a

--should display 5

...and also create new ones on the way...

set a to 2

display dialog a

--should display 2

set a to 5 as string

set b to 6 as string

display dialog a & " " & b

--should display 5 6

You have to set the variables as a string if there are more than 1 var to show, or else it doesn't work.

Now it's getting fun! You can also try this:

set a to 2

say a

--should say 2 (two)

set a to 5 as string

set b to 6 as string

say a & " " & b

--should say 5 6 (five six)

NOTE: The variables' names can be anything, not just a or b.

END OF LESSON 2. In PART 2-1, we will learn a bit more on vars and using them in math. For now, bye!

Now that it's getting harder, I now accept questions further from here.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.