Sulla
USA
Asked
— Edited
Just curios if there is a step by step guide on using variables and arrays in this scripting language?
Just curios if there is a step by step guide on using variables and arrays in this scripting language?
Not to my knowledge. TUTORIAL TIME!
To set a variable, you use:
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.
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.
Number 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...
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
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: https://synthiam.com/Tutorials/Course/6
Also, follow the activities tutorials and variables and IF conditions and and and are all included.
Thanks DJ.
No prob!
Here's an example you can play with as well
Load ARC
Add an EZ-Script control (Add Control -> Scripting -> EZ-Script)
Press Config and paste this code
run that
also, you can do this
or this
@technopro.
Already covered. See below.@Sulla.
As well as the information posted above, these tutorials might be of use to you...
Explanation and Uses of Arrays Tutorial
Setting and using variables in step 4 of this Tutorial.
Great I will get to work with the new info.
@Steve, How quickly we'er forgotten.
Also your first link is incorrect. Here'e the proper link:
Explanation and uses of Arrays Tutorial: synthiam.com/Tutorials/UserTutorials/166/1
Lol, thanks Dave.
(Link fixed).
Oh - and lastly, the question mark on each control will bring you to the respective manual page. In this case, the EZ-Script control question mark will take you here: https://synthiam.com/Tutorials/Help.aspx?id=40
There are A LOT of tutorials for EZ-Script on that page