diff --git a/Future-P%23-Versions.md b/Future-P%23-Versions.md index 63dc736..9cde49b 100644 --- a/Future-P%23-Versions.md +++ b/Future-P%23-Versions.md @@ -25,10 +25,20 @@ A data structure is a group of data elements grouped together under one name. Th Structure members can be access by using a dot operator (.). The arrow operator cannot be used because a structure is not an object. -### Exponentiation via ** +### Exponentiation Operator A right associative \** operator can be added to support exponentiation, along with a \**= shorthand assignment operator. <% printf("2 ** 3 = %d\n", 2 ** 3); // 8 printf("2 ** 3 ** 2 = %d\n", 2 ** 3 ** 2); // 512 %> + +### Null Coalescing Operator +The ??-operator could return the left side as long as it's not null, in that case the right side would be returned + + <% + int $var1 = getValue(); + int $var2 = 7; + + int $result = $var1 ?? $var2; // $result will be 7 if $var1 is NULL + %> \ No newline at end of file