Migrating from EZ-Script to JavaScript
Semicolon Line Endings
When writing EZ-Script code, at the end of the line you simply press <enter> and start coding on the next line. However, in JavaScript, it is recommended to terminate the line with a semicolon ; character. With the ARC JavaScript compiler, it is not mandatory to do it, but you will find most code examples will have the semicolon at the end of the line.
Examples
EZ-Script Example
Code:
print("This is some text")
print("This is another line of text")
JavaScript Example
Code:
print("This is some text");
print("This is another line of text");
*Note: Notice the semicolon at the end of the lines in JavaScript. Again, it's not mandatory, but it is recommended for proper JavaScript compliance.
Why Semicolons?
Traditionally, a semicolon has been common across many programming languages to tell the compiler the end of the command. This is because many commands can be included on the same line with JavaScript. It is not recommended to do this because it is messy to read, but some people program this way.
Example Of Many Commands On One Line
Code:
print("Hello"); print("World");
Edit.... I think I had a similar question last week about using my old EZ scripts and did you point out some tutorial Link? I seem to have forgot where.
The windows Copy and Paste command will copy the text. There is no way to "convert code" when pasting. It will merely paste what is copied. Once you paste the EZ-Script into the JavaScript window, you can edit the code to make it JavaScript syntax.