Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started
Asked — Edited

Is There A Step By Step Guide For Using Variables And Arrays In This Scripting L

Just curios if there is a step by step guide on using variables and arrays in this scripting language?


Upgrade to ARC Pro

ARC Early Access will give you immediate updates and new features needed to unleash your robot's potential!

AI Support Bot
Related Content
Based on your post activity, we found some content that may be interesting to you. Explore these other tutorials and community conversations.
Not to my knowledge. TUTORIAL TIME! ;)

To set a variable, you use:


$myvariable = "chicken"

A variable must be assigned something before you call it in the script.

To make an If statement using a variable, you need to compare the variable to either a set value or a sensor value.


If ($myvariable = "chicken")
Say("Its not Chicken")

Every script command has an explanation about it in the script manual.
OK thanks for the help seems pretty simple. I will also see what other script related tutorials I can find just on general scripting.
All programming languages use the concept of variables, and they're identical. Any information you find on any programming language will apply the basis to ez-script, or visual basic, or c#, or c++, etc..

As technopro pointed out, you can assign strings and numbers. Those are primitive elements of computers.

A number is not a character found in words. A number includes one of the following digits only: 0 1 2 3 4 5 6 7 8 9 .
*Note i included the period (.) because it is an attribute to a number.

When assigning a number to a variable, you do it like this...


$variableName = 5

Strings (words)
Strings are words, such as you are reading or will find in the dictionary. A string is words wrapped in quotes. A quote is this character ". The reason strings require quotes, is to tell the computer where the string begins, and where the string ends. This differs from a number, because a number does not have spaces.

Here is an example of assigning a string to a variable


$variableName = "Hello World"

Use the EXAMPLES folder included in ARC to view examples of programming concepts. There is directions on finding the Examples folder in the activities tutorial: http://www.ez-robot.com/Tutorials/Course/6

Also, follow the activities tutorials and variables and IF conditions and and and are all included.
No prob!:)

Here's an example you can play with as well

1) Load ARC

2) Add an EZ-Script control (Add Control -> Scripting -> EZ-Script)

3) Press Config and paste this code


$Variable = "Hello World"


run that

also, you can do this


$Variable = "Hello";

print( $Variable + " World" )

or this


$Variable1 = "Hello"

$Variable2 = "World"

print( $Variable1 + " " + $Variable2 )
Great I will get to work with the new info.:)
United Kingdom
Lol, thanks Dave.:)

(Link fixed).