# minus

(-) 減算演算子, 符号変更

```X - Y
-Y```

X, Y

### 説明

As soon as a boolean is involved in a substraction with a number (decimal, complex, or encoded integer), it is automatically converted in the type (and integer type) of the number before performing the substraction or the sign change, as `%F => 0` and `%T => 1`.

Whatever is the (regular) type of `X`, then `[]-X`, `X-[]`, and `-[]` return `[]`.

### 例

```[] - 2
1 - []
[2, 5] - 1
[2, 5] - [3 -2]

%s - 2
1/%s - 2```
```--> [] - 2
ans  =
[]

--> 1 - []
ans  =
[]

--> [2, 5] - 1
ans  =
1.   4.

--> [2, 5] - [3 -2]
ans  =
-1.   7.

--> %s - 2
ans  =
-2 +s

--> 1/%s - 2
ans  =
1 - 2s
-------
s
```

With booleans:

```-[%f %t]
[%f %f %t %t]  - [%f %t %f %t]
%t - %i
c = %t - int8(7), inttype(c)```
```--> -[%f %t]
ans  =
0.  -1.

--> [%f %f %t %t]  - [%f %t %f %t]
ans  =
0.  -1.   1.   0.

--> %t - %i
ans  =
1. - i

--> c = %t - int8(7), typeof(c)
c  =
-6

ans  =
int8
```

### 参照

• plus — 数値の加算。 テキストの連結（グループ化）
• operators — scilab 演算子の名前
 バージョン 記述 6.0.0 `A - []` and `[] - A` now return `[]` instead of `A` or `-A`.