-
-
Notifications
You must be signed in to change notification settings - Fork 787
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
len
function doesn't work on static arrays
#2347
Comments
This can be handled pretty easily during constant folding. Although given the length of an array is static, it seems redundant? |
It would be sort of redundant, but it would be a handy shortcut that's easier to read versus having to go check that the sizes match of two static arrays. It also introduces syntax that will become handy with dynamic arrays. |
@fubuloubu What should len return, size in bytes, words or elements? |
Number of elements of the list, basically |
@fubuloubu can we close this as dup of #1963? |
I wouldn't say a dup of it, the two functions perform different roles, but yes they are related |
It should be possible to ask for the length of a static array, and have it give you the same number back you used to set it up
but tells me that len only function for bytes and string types
Originally posted by @QuetzalAzul in #2346
The text was updated successfully, but these errors were encountered: