Liste des Groupes | Revenir à cl c |
Thiago Adams <thiago.adams@gmail.com> writes:
...
>I also curious about how bool works.>
>
Values converted to bool became 0 or 1.
When this conversion happens, at read or write? Both?
You can take a value obtained by reading an object, or a value produced
by evaluating an expression, and convert that value to a different type.
That value can later be stored in an object, or it could be used as one
of the operands for an expression. The conversion isn't associated with
either the read or the write. Many conversions occur implicitly, a cast
is used to explicitly make a conversion occur.
>
int x = 3;
bool b = x;
>
In the above code, an implicit conversion from int to bool occurs after
reading the value of 3 from x, and occurs before writing to bool.
>
b = !(bool)(x-3);
>
In this code, the conversion occurs after the value of 3 is retrieved
from x, and after 3 is subtracted from it. That result of 0 is then
converted to bool, and then the ! operator is applied to it. Finally,
the result is written to b. So you see, it doesn't make sense to connect
the conversion with either the read or the write.
Date | Sujet | # | Auteur | |
7 Aug 24 | ![]() | 122 | Thiago Adams | |
7 Aug 24 | ![]() ![]() | 7 | Thiago Adams | |
7 Aug 24 | ![]() ![]() ![]() | 1 | Keith Thompson | |
12 Aug 24 | ![]() ![]() ![]() | 5 | Tim Rentsch | |
12 Aug 24 | ![]() ![]() ![]() ![]() | 4 | Vir Campestris | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() | 3 | Tim Rentsch | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() | 2 | Lew Pitcher | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Tim Rentsch | |
7 Aug 24 | ![]() ![]() | 107 | Dan Purgert | |
7 Aug 24 | ![]() ![]() ![]() | 1 | Keith Thompson | |
8 Aug 24 | ![]() ![]() ![]() | 1 | Lawrence D'Oliveiro | |
8 Aug 24 | ![]() ![]() ![]() | 101 | Thiago Adams | |
8 Aug 24 | ![]() ![]() ![]() ![]() | 25 | Bart | |
8 Aug 24 | ![]() ![]() ![]() ![]() ![]() | 24 | Michael S | |
8 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Thiago Adams | |
8 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() | 22 | Bart | |
8 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 5 | Thiago Adams | |
8 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Thiago Adams | |
8 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 2 | Bart | |
8 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Thiago Adams | |
8 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Keith Thompson | |
8 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 16 | David Brown | |
8 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 15 | Bart | |
8 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 13 | David Brown | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 9 | Keith Thompson | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 3 | Lawrence D'Oliveiro | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Keith Thompson | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | James Kuyper | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 5 | David Brown | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 4 | Keith Thompson | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 3 | Tim Rentsch | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 2 | Keith Thompson | |
3 Sep 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Tim Rentsch | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 3 | Bart | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 2 | David Brown | |
10 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Bart | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Lawrence D'Oliveiro | |
8 Aug 24 | ![]() ![]() ![]() ![]() | 75 | Keith Thompson | |
8 Aug 24 | ![]() ![]() ![]() ![]() ![]() | 74 | Thiago Adams | |
8 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() | 72 | Bart | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 47 | Keith Thompson | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 38 | Bart | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 2 | David Brown | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Bart | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 29 | James Kuyper | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 14 | Bart | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 3 | Keith Thompson | |
10 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 2 | Bart | |
10 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Keith Thompson | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 10 | James Kuyper | |
13 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | David Brown | |
13 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Bart | |
13 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 7 | James Kuyper | |
13 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 6 | Bart | |
13 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 5 | Keith Thompson | |
13 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 4 | Bart | |
14 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 3 | Tim Rentsch | |
14 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 2 | Bart | |
18 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Tim Rentsch | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 2 | Keith Thompson | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | James Kuyper | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 12 | Kaz Kylheku | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 9 | Keith Thompson | |
10 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 8 | Kaz Kylheku | |
10 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 6 | Keith Thompson | |
10 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 3 | Kaz Kylheku | |
10 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Keith Thompson | |
10 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | James Kuyper | |
10 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 2 | Bart | |
13 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | David Brown | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Tim Rentsch | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | James Kuyper | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Tim Rentsch | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 4 | Keith Thompson | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 3 | Bart | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 2 | Keith Thompson | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Bart | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 2 | Tim Rentsch | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Bart | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 8 | Tim Rentsch | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 7 | Bart | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Keith Thompson | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 5 | Tim Rentsch | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 4 | Keith Thompson | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 3 | Ben Bacarisse | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 2 | Tim Rentsch | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Keith Thompson | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 24 | Thiago Adams | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 2 | Bart | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Keith Thompson | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 19 | David Brown | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 18 | Thiago Adams | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 3 | Thiago Adams | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | David Brown | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Keith Thompson | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 11 | David Brown | |
10 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 10 | Bart | |
10 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 9 | Thiago Adams | |
10 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 8 | Bart | |
11 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 7 | Thiago Adams | |
11 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 6 | Keith Thompson | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 3 | Keith Thompson | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 2 | Keith Thompson | |
8 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() | 1 | David Brown | |
8 Aug 24 | ![]() ![]() ![]() | 3 | Stefan Ram | |
7 Aug 24 | ![]() ![]() | 6 | Keith Thompson | |
8 Aug 24 | ![]() ![]() | 1 | Lawrence D'Oliveiro |
Les messages affichés proviennent d'usenet.