To print variables within a string, you can use{}
as a placeholder for the variable, and then pass its value as an argument. You can also use multiple placeholders, just remember to supply all the arguments in order.
To print variables within a string, you can use{}
as a placeholder for the variable, and then pass its value as an argument.
You can also use multiple placeholders, just remember to supply all the arguments in order.
Integer types Examples includeAlthough this block could be broken down into one for signed integers and another for unsigned integers, it’s probably not worth it. The concept covers multiple data types, and the block is just expanding on one of them. If this block was in a concept that was solely about integers, it’d probably make sense to split up.i32
,u32
,i64
, andu64
. The name of each type gives hints about its features.The number at the end like 32 or 64 tells us how much space it uses in memory.
i32
andi64
and such have an i, meaning they’re signed. This means they can be negative, zero, or positive.u32
andu64
and others have a u, showing they’re unsigned. They can only be zero or positive.