November 06 Learn » Re: Negating a short? | |||
|---|---|---|---|
| |||
...the latest code that works:
```d
void main()
{
Short foo = { 21 };
foo *= -1;
foo = foo... | |||
November 06 Learn » Re: Negating a short? | |||
|---|---|---|---|
| |||
...have to correct my mistake:
```d
void main()
{
Short foo = { -21 };
s *= -1;
foo = foo... | |||
November 06 Learn » Re: Negating a short? | |||
|---|---|---|---|
| |||
...kind might be a solution:
```d
void main()
{
Short foo = { -21 };
foo = foo * -2;
assert... | |||
November 06 Learn » Re: Negating a short? | |||
|---|---|---|---|
| |||
...t these two act the same?
void main(){
short i = 1;
i *= -1; // Works
i... | |||
November 05 Issues » [Issue 24844] New: BigInt multiplication of 0 by integral (non-BigInt) type creates "-0" (negative zero) | |||
|---|---|---|---|
| |||
...std.stdio : writeln;
import std.bigint;
void main() {
BigInt a = BigInt("0"); // 0
BigInt b... | |||
November 05 Learn » Re: Negating a short? | |||
|---|---|---|---|
| |||
...short`
For:
import std.stdio : writeln;
void
main() {
short s = -5;
s = -s;
writeln(s... | |||
November 05 Issues » [Issue 24842] No ability to overload unary logial not operator | |||
|---|---|---|---|
| |||
...string op : "+")(A rhs){
return B();
}
}
void main() {
C c;
B b = c + A();
}
```
I... | |||
November 04 General » [SAOC 2024] Improve D Error Messages - Weekly Update #7 | |||
|---|---|---|---|
| |||
...blob/main/utilities.d) - **Documentation:** [utilities.md](https://github.com/royalpinto007/d-drafts/blob/main... | |||
November 03 Learn » Re: Rhyme and reason for function annotations? | |||
|---|---|---|---|
| |||
...It's a matter of preference. The main gotcha there is that if an attribute... | |||
November 03 DIP Ideas » Re: Allow designated initialization of struct | |||
|---|---|---|---|
| |||
...typedef struct {
size_t counter;
} S;
int main()
{
assert(Four == 3);
auto arr[] = { One, Two... | |||
Copyright © 1999-2021 by the D Language Foundation