On Wednesday, 21 July 2021 at 03:25:03 UTC, apz28 wrote:
with below error message:
..\..\pham\db\db_skdatabase.d(140): Error: null dereference in
function
_D4pham2db10fbdatabase7FbArray__T13readArrayImplTbZQsMFNfCQCeQCc8database12DbNameColumnZAb
..\..\pham\db\db_skdatabase.d(139): Error: null
On Tuesday, 20 July 2021 at 18:32:26 UTC, Ali Çehreli wrote:
On 7/19/21 11:20 PM, Tejas wrote:
> trying to create the spaceship operator of C++
Just to make sure, D's opCmp returns an int. That new C++
operator was added to provide the same semantics.
Ali
I know. As I already mentioned,
VisualD project - Any hint to work around
DMD version:
DMD32 D Compiler v2.096.0-rc.1-dirty
Copyright (C) 1999-2021 by The D Language Foundation, All Rights
Reserved written by Walter Bright
Failed Build Command line:
dmd -release -m32mscoff -O -inline -dip25 -dip1000
-preview=fixAliasThis
On Tuesday, 20 July 2021 at 21:18:12 UTC, Bagomot wrote:
But there is a problem with different types. I understand that
Object[] is not suitable here, but I don’t know how to do it.
I ask you to help me with this.
IIUC, the `arguments` are command line arguments passed to a Java
program,
I have a json like this:
```json
{
"arguments":{
"jvm":[
{
"rules":[
{
"action":"allow",
"os":{
"name":"osx"
}
}
],
"value":[
On 7/20/21 11:49 AM, H. S. Teoh wrote:
> On Tue, Jul 20, 2021 at 11:32:26AM -0700, Ali Çehreli via
Digitalmars-d-learn wrote:
>> On 7/19/21 11:20 PM, Tejas wrote:
>>
>>> trying to create the spaceship operator of C++
>>
>> Just to make sure, D's opCmp returns an int. That new C++ operator was
On Tuesday, 20 July 2021 at 18:49:07 UTC, H. S. Teoh wrote:
On Tue, Jul 20, 2021 at 11:32:26AM -0700, Ali Çehreli via
Digitalmars-d-learn wrote:
On 7/19/21 11:20 PM, Tejas wrote:
> trying to create the spaceship operator of C++
Just to make sure, D's opCmp returns an int. That new C++
On Tue, Jul 20, 2021 at 11:32:26AM -0700, Ali Çehreli via Digitalmars-d-learn
wrote:
> On 7/19/21 11:20 PM, Tejas wrote:
>
> > trying to create the spaceship operator of C++
>
> Just to make sure, D's opCmp returns an int. That new C++ operator was
> added to provide the same semantics.
[...]
On 7/19/21 11:20 PM, Tejas wrote:
> trying to create the spaceship operator of C++
Just to make sure, D's opCmp returns an int. That new C++ operator was
added to provide the same semantics.
Ali
On Tuesday, 20 July 2021 at 09:24:07 UTC, Mark Lagodych wrote:
Is there a way to make myvar local to each instance of `X`
without making it a variable of `X`? Just curious.
Yes.
```d
import std.stdio;
class X {
int x(int param) {
static int[typeof(this)] myvar;
if (param
On Tuesday, 20 July 2021 at 09:24:07 UTC, Mark Lagodych wrote:
Let's say I have this code:
```d
import std.stdio;
class X {
int x(int param) {
static int myvar = 1234;
if (param == 0) return myvar;
else { myvar = param; return myvar; }
}
}
void main()
{
X
On Tuesday, 20 July 2021 at 09:24:07 UTC, Mark Lagodych wrote:
```d
void main()
{
X x1 = new X;
X x2 = new X;
x1.x(0).writeln;
x2.x(0).writeln;
x1.x(17).writeln;
x2.x(0).writeln;
}
```
Ow, sorry, I forgot to say. It prints:
```
1234
1234
17
17
```
Let's say I have this code:
```d
import std.stdio;
class X {
int x(int param) {
static int myvar = 1234;
if (param == 0) return myvar;
else { myvar = param; return myvar; }
}
}
void main()
{
X x1 = new X;
X x2 = new X;
x1.x(0).writeln;
On Tuesday, 20 July 2021 at 06:34:45 UTC, vit wrote:
On Tuesday, 20 July 2021 at 06:20:34 UTC, Tejas wrote:
...
Initially, I was trying to create the spaceship operator of
C++, but we aren't allowed to create new operators
...
D has spaceship operator: opCmp
On Tuesday, 20 July 2021 at 06:30:56 UTC, Mike Parker wrote:
On Tuesday, 20 July 2021 at 06:20:34 UTC, Tejas wrote:
Why isn't it working by default?
Initially, I was trying to create the spaceship operator of
C++, but we aren't allowed to create new operators, it seems.
Then I just wanted to
On Tuesday, 20 July 2021 at 06:20:34 UTC, Tejas wrote:
Why isn't it working by default?
Initially, I was trying to create the spaceship operator of
C++, but we aren't allowed to create new operators, it seems.
Then I just wanted to verify whether we can even overload an
operator globally,
On Tuesday, 20 July 2021 at 06:20:34 UTC, Tejas wrote:
...
Initially, I was trying to create the spaceship operator of
C++, but we aren't allowed to create new operators
...
D has spaceship operator: opCmp
(https://dlang.org/spec/operatoroverloading.html#compare).
The following doesn't work:
```d
import std;
int opBinary(string s:"+")(int a, int b){
int result;
ab? (result = 1): (result = 0);
return result;
}
void main(){
int f = 1 + 5;
writeln(f);
}
```
It outputs 6
But if I manually write it as
```d
int f = opBinary!"+"(1,5);
```
It
On 7/19/21 5:07 PM, seany wrote:
> Consider :
>
> for (int i = 0; i < max_value_of_i; i++) {
> foreach ( j, dummyVar; myTaskPool.parallel(array_to_get_j_from,
> my_workunitSize) {
>
> if ( boolean_function(i,j) ) continue;
> double d =
19 matches
Mail list logo