Next: Arithmetics operators
- = is the assignment operator.
- x=42; puts 42 into the variable x. The previous
value is forgotten.
- x=y; copies the value of variable y into x. If
y was undefined, x becomes undefined too.
-  is the array index operator.
- A variable cannot be atomic6 and an array at the same time. If you changed the type, the previous
value(s) is (are) lost.
- However, this operator can be used to extract a character from a string:
if s = "abcde", then s =
In NASL1, this could be used to change the character too: you
could write s = "C"; and s became "abCde".
This is no longer true; you have to use the insstr function
and write something like s = insstr(s, "C", 2, 2); See insstr
- y = 42; makes an array out of y and puts 42
in the second element. If y was not an array, it's first