17 |
|
|
18 |
|
Represent::Represent() |
19 |
|
{ |
20 |
< |
ext::String string("1001"); |
21 |
< |
Binary sign(string, true), unsign(string, false); |
20 |
> |
api::Cerr << Binary("Hello, World!") << " = " << Hexadecimal("Hello, World") << " = Hello, World!" << ios::NewLine; |
21 |
|
|
22 |
< |
api::Cerr << string << ios::NewLine << ext::String(sign) << ios::NewLine << ext::String(unsign) << ios::NewLine; |
22 |
> |
std::string hello("Hello, World!"); |
23 |
|
|
24 |
< |
string = "deadbeef"; |
24 |
> |
api::Cerr << Binary(hello) << " = " << Hexadecimal(hello) << " = " << ext::String(hello) << ios::NewLine; |
25 |
|
|
26 |
< |
Hexadecimal test(string, false); |
26 |
> |
_sforeach (std::string, atom, hello) api::Cerr << Binary(*atom) << " = " << Hexadecimal(*atom) << " = " << ext::String(atom, 1) << ios::NewLine; |
27 |
|
|
28 |
< |
api::Cerr << string << ios::NewLine << ext::String(test) << ios::NewLine; |
28 |
> |
ext::String hello_(hello); |
29 |
|
|
30 |
< |
Hexadecimal sign_(sign), unsign_(unsign); |
30 |
> |
api::Cerr << Binary(hello_) << " = " << Hexadecimal(hello_) << " = " << hello_ << ios::NewLine; |
31 |
|
|
32 |
< |
api::Cerr << ext::String(sign_) << ios::NewLine << ext::String(unsign_) << ios::NewLine; |
32 |
> |
_foreach (ext::String, atom, hello_) api::Cerr << Binary(*atom) << " = " << Hexadecimal(*atom) << " = " << ext::String(*atom) << ios::NewLine; |
33 |
> |
|
34 |
> |
_fori (index, -10, 11) api::Cerr << Binary(index) << " = " << Hexadecimal(index) << " = " << index << ios::NewLine; |
35 |
> |
|
36 |
> |
_foru (index, 0xFFFFFFF6, 11) api::Cerr << Binary(index) << " = " << Hexadecimal(index) << " = " << index << ios::NewLine; |
37 |
> |
|
38 |
> |
for (float index(-1); index < 1.1; index += 0.1) api::Cerr << Binary(index) << " = " << Hexadecimal(index) << " = " << index << ios::NewLine; |
39 |
> |
|
40 |
> |
for (double index(-1); index < 1.1; index += 0.1) api::Cerr << Binary(index) << " = " << Hexadecimal(index) << " = " << index << ios::NewLine; |
41 |
|
} |