1
0
mirror of https://github.com/KarolS/millfork.git synced 2024-05-28 13:41:31 +00:00

Document explicit bool conversions

This commit is contained in:
Karol Stasiak 2020-11-11 00:27:29 +01:00
parent f4a3601d6e
commit cd6b789416

View File

@ -69,6 +69,14 @@ or forcing zero extension or sign extension:
x = y // does zero extension and assigns value $0080
x = sbyte(y) // does sign extension and assigns value $FF80
You can also explicitly convert expressions of type `bool` to any numeric type.
`false` is converted to 0 and `true` is converted to 1.
byte a,b,c
a = 5
b = byte(a == 4) // b is now equal to 0
c = byte(a == 5) // c is now equal to 1
## Typed pointers
For every type `T`, there is a pointer type defined called `pointer.T`.