'How to enter more than 1 value in an array in C/AL Microsoft NAV?

I want to enter more than one value in an array in C/AL without having to use many lines. It will only set the values in a array like this:

numbers[1] := 5;
numbers[2] := 20;
numbers[3] := 12;
numbers[4] := 9;

But I want to know if there is any Java-like way to introduce them like this:

int[] numbers = {5, 20, 12, 9};


Solution 1:[1]

Nope. You can't do things like that in neither c/al nor al.

There are tons of syntax sugar that won't work in Nav like in other mature languages. So if you new one, just run.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mak Sim