You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The final decision was that fixed arrays should be changed to the following syntax [<size>]<type>[<values>], or [..]<type>[<values>] where the literal .. for the size means the compiler should count the number of values between the second [ and ] pair.
Also, the [<size>] part can be specified multiple times for multi-dimensional arrays.
Examples:
arr1:= [4]f32[1234]
arr2:= [4][4]f32[
[1234]
[5542]
[0130]
[0141]
]
// etc., etc. The same arrays could also be entered asarr3:= [..]f32[1234]
arr4:= [..][..]f32[
[1234]
[5542]
[0130]
[0141]
]
// using literal numbers for sizes makes it explicit without anyone having to count// the number of values again.// using `..` for sizes means you can freely add/remove values, and the compiler// will handle the changes by counting the number of values at compile time.
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
Fixed arrays can currently be declared either by
[<size>]<type>{}for an empty array, or[<type cast>(value), value2, value3, ...]!.However, a discussion was started by Alex in November 2024, here: https://discord.com/channels/592103645835821068/700746775962714232/1306274293054832800
The final decision was that fixed arrays should be changed to the following syntax
[<size>]<type>[<values>], or[..]<type>[<values>]where the literal..for the size means the compiler should count the number of values between the second[and]pair.Also, the
[<size>]part can be specified multiple times for multi-dimensional arrays.Examples:
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.