Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Scripts are typically divided into two parts: the Declaration Part and the Program Part. The declaration part is used to establish internal variables and input parameters. The program part includes all program statements outside of the variable declarations.

Users can place comments anywhere in the comments by placing a ‘/*’ at the start of the comment and a ‘*/’ at the end of the comment.

Ex: /* This is the proper structure for a comment 스크립트는 일반적으로 선언 부분과 프로그램 부분의 두 부분으로 나뉩니다. 선언 부분은 내부 변수 및 입력 매개 변수를 설정하는 데 사용됩니다. 프로그램 부분에는 변수 선언 외부의 모든 프로그램 명령문이 포함됩니다.

사용자는 스크립트 내에 주석을 사용 할 수 있습니다.

Ex: /* 사용자는 해당 기호 안에 남기고자 하는 내용을 남길 수 있습니다.*/

(1) Declaration Part선언부

Item항목

Description내용

Variable Declaration

Declare internal variables using the following format아래와 같은 형식으로 변수를 선언합니다:

var variable_name;The initial value of declared variables is 0. To declare more than one variable, use a comma “ , ” between variables:

선언된 변수의 초기 값은 0입니다. 둘 이상의 변수를 선언하려면 변수 사이에 쉼표 " , "를 사용합니다.

var variable_name_1, variable_name_2,, variable_name_n;

Users can use multiple VAR keywords before the program part starts.

Users can also define an initial value for the variable when declaring it using the following format:사용자는 프로그램 부분이 시작되기 전에 여러 VAR 키워드를 사용할 수 있습니다.

사용자는 다음 형식을 사용하여 선언할 때 변수의 초기 값을 정의할 수도 있습니다.

var variable_name = 1;

(2) Program Part

In the program part, all program statements except the declaration (variables and parameters) can be used. An example of the most basic statement is the function call, calculation, and storing of the result.

The following program example is composed of basic statements프로그램

프로그램 부분에서는 선언(변수 및 매개변수)을 제외한 모든 프로그램 문을 사용할 수 있습니다. 가장 기본적인 문장의 예로는 함수 호출, 계산, 결과 저장이 있습니다.

다음 프로그램 예제는 기본 문장으로 구성되어 있습니다.

var_a = var_a + 1;

var_b = MyPgm(var_a, 2, 3);

Each statement must end with a semicolon “ ; ”. Each function returns a single result to the caller. The program shown above returns the result of MyPgm to “var_b”각 문은 세미콜론 " ; ". 각 함수는 호출자에게 단일 결과를 반환합니다. 위의 프로그램은 MyPgm의 결과를 "var_b"로 반환합니다.