Re: D1 code to D2I

2019-08-22 Thread Stefan Koch via Digitalmars-d-learn
On Thursday, 22 August 2019 at 18:10:51 UTC, jicman wrote: Greetings! Is there any tool out there, I searched around and didn't find any, that would take ton of D1 code and convert it to D2? Thanks. josé There is: https://github.com/sociomantic-tsunami/d1to2fix It might be please ask

Re: D1: Trying to update Juno Library to 1.076

2019-08-22 Thread jicman via Digitalmars-d-learn
On Thursday, 22 August 2019 at 18:54:50 UTC, jicman wrote: On Thursday, 22 August 2019 at 18:26:52 UTC, jicman wrote: OPTLINK (R) for Win32 Release 8.00.12 Copyright (C) Digital Mars 1989-2010 All rights reserved. http://www.digitalmars.com/ctg/optlink.html

Re: D1: Trying to update Juno Library to 1.076

2019-08-22 Thread jicman via Digitalmars-d-learn
On Thursday, 22 August 2019 at 17:34:01 UTC, a11e99z wrote: On Thursday, 22 August 2019 at 16:59:03 UTC, jicman wrote: These are the options for dmd 1.076: -v verbose Well, this one is definitely verbose. ;-) But, I don't see anything in it that will help. But, here it

Re: How to removes an variable topmost const. like remove_const in C++.

2019-08-22 Thread Paul Backus via Digitalmars-d-learn
On Thursday, 22 August 2019 at 18:50:59 UTC, lili wrote: Hi: I write a template function is below, that need to remove const topmost if has. How to do this? https://dlang.org/phobos/std_traits.html#Unqual

How to removes an variable topmost const. like remove_const in C++.

2019-08-22 Thread lili via Digitalmars-d-learn
Hi: I write a template function is below, that need to remove const topmost if has. How to do this? const int i =3; println(i); void println(A...)(A a) { char[20] numStr = void; foreach(v ; a) { if (is(v.type == byte) || is(v.type == ubyte) ||

Re: D1: Trying to update Juno Library to 1.076

2019-08-22 Thread jicman via Digitalmars-d-learn
On Thursday, 22 August 2019 at 18:26:52 UTC, jicman wrote: OPTLINK (R) for Win32 Release 8.00.12 Copyright (C) Digital Mars 1989-2010 All rights reserved. http://www.digitalmars.com/ctg/optlink.html c:\D\import\juno\com\core.obj(core) Error 42: Symbol Undefined _VarCmp@16

Re: D1: Trying to update Juno Library to 1.076

2019-08-22 Thread jicman via Digitalmars-d-learn
On Thursday, 22 August 2019 at 18:20:09 UTC, jicman wrote: On Thursday, 22 August 2019 at 17:34:01 UTC, a11e99z wrote: On Thursday, 22 August 2019 at 16:59:03 UTC, jicman wrote: These are the options for dmd 1.076: -v verbose Well, this one is definitely verbose. ;-) But, I

Re: D1: Trying to update Juno Library to 1.076

2019-08-22 Thread jicman via Digitalmars-d-learn
On Thursday, 22 August 2019 at 18:25:44 UTC, jicman wrote: On Thursday, 22 August 2019 at 18:20:09 UTC, jicman wrote: On Thursday, 22 August 2019 at 17:34:01 UTC, a11e99z wrote: On Thursday, 22 August 2019 at 16:59:03 UTC, jicman wrote: These are the options for dmd 1.076: -v

D1 code to D2

2019-08-22 Thread jicman via Digitalmars-d-learn
Greetings! Is there any tool out there, I searched around and didn't find any, that would take ton of D1 code and convert it to D2? Thanks. josé

Re: D1: Trying to update Juno Library to 1.076

2019-08-22 Thread a11e99z via Digitalmars-d-learn
On Thursday, 22 August 2019 at 16:59:03 UTC, jicman wrote: On Thursday, 22 August 2019 at 16:36:45 UTC, a11e99z wrote: On Thursday, 22 August 2019 at 16:34:52 UTC, a11e99z wrote: On Thursday, 22 August 2019 at 16:34:06 UTC, a11e99z wrote: On Thursday, 22 August 2019 at 16:07:00 UTC, jicman

Re: How to write __traits(isSame, T, int) use another way

2019-08-22 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 22 August 2019 at 17:05:49 UTC, lili wrote: Thanks alot, How to get a variable's type? typeof(c)

Re: How to write __traits(isSame, T, int) use another way

2019-08-22 Thread lili via Digitalmars-d-learn
On Thursday, 22 August 2019 at 17:01:09 UTC, Adam D. Ruppe wrote: On Thursday, 22 August 2019 at 16:54:56 UTC, lili wrote: I think the __traits(isSame, T, int) syntax is too uglily, Is where an other way rewrite it. like this isSameType!(T,int) For types you can (and often should) just

Re: How to write __traits(isSame, T, int) use another way

2019-08-22 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 22 August 2019 at 16:54:56 UTC, lili wrote: I think the __traits(isSame, T, int) syntax is too uglily, Is where an other way rewrite it. like this isSameType!(T,int) For types you can (and often should) just use is(T == int) the isSame thing is more about comparing

Re: D1: Trying to update Juno Library to 1.076

2019-08-22 Thread jicman via Digitalmars-d-learn
On Thursday, 22 August 2019 at 16:36:45 UTC, a11e99z wrote: On Thursday, 22 August 2019 at 16:34:52 UTC, a11e99z wrote: On Thursday, 22 August 2019 at 16:34:06 UTC, a11e99z wrote: On Thursday, 22 August 2019 at 16:07:00 UTC, jicman wrote: On Thursday, 22 August 2019 at 15:58:56 UTC, a11e99z

How to write __traits(isSame, T, int) use another way

2019-08-22 Thread lili via Digitalmars-d-learn
Hi: I think the __traits(isSame, T, int) syntax is too uglily, Is where an other way rewrite it. like this isSameType!(T,int)

Re: D1: Trying to update Juno Library to 1.076

2019-08-22 Thread a11e99z via Digitalmars-d-learn
On Thursday, 22 August 2019 at 16:34:52 UTC, a11e99z wrote: On Thursday, 22 August 2019 at 16:34:06 UTC, a11e99z wrote: On Thursday, 22 August 2019 at 16:07:00 UTC, jicman wrote: On Thursday, 22 August 2019 at 15:58:56 UTC, a11e99z wrote: case of string doesn't matter for Windows. I mean

Re: D1: Trying to update Juno Library to 1.076

2019-08-22 Thread a11e99z via Digitalmars-d-learn
On Thursday, 22 August 2019 at 16:34:06 UTC, a11e99z wrote: On Thursday, 22 August 2019 at 16:07:00 UTC, jicman wrote: On Thursday, 22 August 2019 at 15:58:56 UTC, a11e99z wrote: case of string doesn't matter for Windows. I mean for command lines (not in D code)

Re: D1: Trying to update Juno Library to 1.076

2019-08-22 Thread a11e99z via Digitalmars-d-learn
On Thursday, 22 August 2019 at 16:07:00 UTC, jicman wrote: On Thursday, 22 August 2019 at 15:58:56 UTC, a11e99z wrote: try to add pragma( lib, "OleAut32.lib" ) Thanks for the support, a11e99z. :-) I have, pragma(lib, "ole32.lib"); pragma(lib, "oleaut32.lib"); on that file. But I did go

Re: D1: Trying to update Juno Library to 1.076

2019-08-22 Thread jicman via Digitalmars-d-learn
On Thursday, 22 August 2019 at 15:58:56 UTC, a11e99z wrote: try to add pragma( lib, "OleAut32.lib" ) Thanks for the support, a11e99z. :-) I have, pragma(lib, "ole32.lib"); pragma(lib, "oleaut32.lib"); on that file. But I did go change it back to your suggestion, pragma(lib, "ole32.lib");

D1: Trying to update Juno Library to 1.076

2019-08-22 Thread jicman via Digitalmars-d-learn
Greetings! I have been working on Juno for a long time with D1 version 1.046, and love it. But now, I want to update it to 1.076, the latest and greatest D1. I have fixed, what I think, were all of the problems. However, when I build the libraries with my program, I get this error:

Re: D1: Trying to update Juno Library to 1.076

2019-08-22 Thread a11e99z via Digitalmars-d-learn
On Thursday, 22 August 2019 at 15:55:48 UTC, jicman wrote: Greetings! I have been working on Juno for a long time with D1 version 1.046, and love it. But now, I want to update it to 1.076, the latest and greatest D1. I have fixed, what I think, were all of the problems. However, when I

Re: How to use #pragma omp parallel for collapse(n) in dlang?

2019-08-22 Thread ijet via Digitalmars-d-learn
On Thursday, 15 August 2019 at 08:08:29 UTC, Daniel Kozak wrote: On Thu, Aug 15, 2019 at 9:44 AM Daniel Kozak wrote: [...] something like this: C version: [...] Thank you!

Re: How do I execute a sql-file inside D code

2019-08-22 Thread XavierAP via Digitalmars-d-learn
On Tuesday, 20 August 2019 at 11:33:33 UTC, Anders S wrote: Use this code to check conn.exec("CREATE DATABASE IF NOT EXISTS boxweb;"); however haven't found a way to run the sql file that create the tables. The file is in the source folder I understand you're using some API to some SQL