Ziggit

Confusion about runtime modification of variable that is not comptime-known (opens in new tab)

Hi everyone, I recently got help to resolve a confusion I had about an . Stepping away from that discussion, I had this tangential thought that is now confusing me. Suppose we define a variable var count: u8 = 1 – this is not comptime-known by virtue of not being const or comptime. Therefore, why is it necessary to give count an explicit fixed-size number type to modify the variable at runtime? Is the number type (u8 in this example) ingested at runtime in some manner? is it processed by the ...

Read the original article
Sign in to keep reading the full article.

Keyboard Shortcuts

Navigation

Next / previous post
j/k
Open post
oorEnter
Preview post
v

Post Actions

Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Save / unsave
s

Recommendations

Add interest / feed
Enter
Not interested
x

Go to

Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Discover
gb
Search
/

General

Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help