On Sunday, 29 June 2014 at 07:51:50 UTC, Jacob Carlborg wrote:
You don't need to use WinMain. You can use a plain D main
function and add the "-L/SUBSYSTEM:WINDOWS:4.0" link flag to
suppress the console. There are API's to get access to the
arguments passed to WinMain, if necessary.
Thanks f
On Sunday, 29 June 2014 at 18:16:05 UTC, Jacob Carlborg wrote:
On 2014-06-29 17:06, Jeremy Sorensen wrote:
The only question I
have is what happens when you use SUBSYSTEM:WINDOWS:4.0 (Which
I
understand means XP or higher) and the program runs on
something older?
Will you get an error messag
On Monday, 30 June 2014 at 04:50:05 UTC, Kenji Hara wrote:
In D, you can merge arbitrary overloads by using alias
declaration.
Oh wow, you are right. That's a nice feature!
I guess I simplified too much for the sake of making the post,
the functions I would actually like to merge are function
On Monday, 30 June 2014 at 02:24:10 UTC, David Bregman wrote:
Suppose I have a C library which implements a function for
several types. C doesn't have overloading, so their names will
be distinct.
extern(C):
double foo_double(double);
float foo_float(float);
Now I want to build a D wrapper, a
On Sunday, 29 June 2014 at 07:28:12 UTC, Kapps wrote:
A bit late, but you should also be able to do:
import scriptlike;
alias Config = std.process.Config;
Thanks, so an alias or an additional single symbol import will
shadow the earlier imported symbol. That's fine for me :-)
On Sun, 29 Jun 2014 22:24:09 -0400, David Bregman wrote:
Suppose I have a C library which implements a function for several
types. C doesn't have overloading, so their names will be distinct.
extern(C):
double foo_double(double);
float foo_float(float);
Now I want to build a D wrapper, and
Suppose I have a C library which implements a function for
several types. C doesn't have overloading, so their names will be
distinct.
extern(C):
double foo_double(double);
float foo_float(float);
Now I want to build a D wrapper, and merge them into a single
function with overloading:
T foo
On Sun, Jun 29, 2014 at 06:08:24PM +0200, Element 126 via Digitalmars-d-learn
wrote:
[...]
> I have used formattedWrite for months without noticing formatValue,
> even though it was on the wiki.
> Maybe I should add an example to the documentation of std.format.
> formatValue is present but withou
On Friday, 27 June 2014 at 12:51:45 UTC, bioinfornatics wrote:
Hi,
I have a linux network and i would like to know if they are a D
library to communicate between computer efficiently.
I do not know if that is better to use websocket and if they
exists into dlang:
-
http://planet.jboss.org/
Hello, I have a compile error when trying to use GtkD 2.3.3. When
I try to create a FileChooseDialog, I call
new FileChooserDialog("Save File",
editor.drawingArea.getParent().getParentWindow(),
FileChooserAction.SAVE,
["OK", "Ca
On 2014-06-29 17:06, Jeremy Sorensen wrote:
The only question I
have is what happens when you use SUBSYSTEM:WINDOWS:4.0 (Which I
understand means XP or higher) and the program runs on something older?
Will you get an error message or just silent failure?
Actually, I don't know. You could try s
On 06/29/2014 04:22 PM, Ali Çehreli wrote:
On 06/29/2014 04:55 AM, Element 126 wrote:
> I've certainly missed something
formatValue passes your tests:
import std.stdio;
import std.format: formattedWrite, FormatSpec, formatValue;
import std.string: format;
struct wrapper(T) {
private T
The only question I have is what happens when you use
SUBSYSTEM:WINDOWS:4.0 (Which I understand means XP or higher)
and the program runs on something older?
On Sunday, 29 June 2014 at 07:51:50 UTC, Jacob Carlborg wrote:
You don't need to use WinMain. You can use a plain D main
function and add the "-L/SUBSYSTEM:WINDOWS:4.0" link flag to
suppress the console. There are API's to get access to the
arguments passed to WinMain, if necessary.
OK so I
On 06/29/2014 04:55 AM, Element 126 wrote:
> I've certainly missed something
formatValue passes your tests:
import std.stdio;
import std.format: formattedWrite, FormatSpec, formatValue;
import std.string: format;
struct wrapper(T) {
private T val;
public this(T newVal) pure { val = n
I am trying to define custom format specifiers (as described here [1])
for the following wrapper struct :
import std.stdio;
import std.format: formattedWrite, FormatSpec;
import std.string: format;
struct wrapper(T) {
private T val;
public this(T newVal) pure { val = newVal; }
On 06/29/2014 11:31 AM, Rene Zwanenburg wrote:
On Sunday, 29 June 2014 at 08:52:36 UTC, Uranuz wrote:
import std.stdio;
string getByName(string name)
{
return "smth";
}
template getByName(string name)
{
enum getByName = .getByName(name);
}
void main()
{
writeln(getByName!("name")
On Sunday, 29 June 2014 at 08:52:36 UTC, Uranuz wrote:
import std.stdio;
string getByName(string name)
{
return "smth";
}
template getByName(string name)
{
enum getByName = .getByName(name);
}
void main()
{
writeln(getByName!("name"));
}
Thanks a lot! Very interestin
import std.stdio;
string getByName(string name)
{
return "smth";
}
template getByName(string name)
{
enum getByName = .getByName(name);
}
void main()
{
writeln(getByName!("name"));
}
Thanks a lot! Very interesting. Do you see any reasoning why this
happens?
On Sunday, 29 June 2014 at 07:16:10 UTC, Uranuz wrote:
Is there any reason why function and template conflict. They
using different syntax to *call*. For template we have *!* but
for function we don't have it. So why compiler is not able to
see the difference?
I suspect this is by design. The
On 2014-06-29 06:47, Jeremy Sorensen wrote:
I found an example of boilerplate code for Win32 programming in D here:
http://wiki.dlang.org/D_for_Win32
I have some questions.
1. It appears that the call to myWinMain from WinMain is to ensure that
any exception or error is caught. At first glance i
On Thursday, 26 June 2014 at 17:07:30 UTC, JJDuck wrote:
On Thursday, 26 June 2014 at 16:33:57 UTC, JJDuck wrote:
I tried to use phobos , but there is no such function exists
for posting to https too
With Phobos, you can use
http://dlang.org/phobos/std_net_curl.html#post. Depending on t
A bit late, but you should also be able to do:
import scriptlike;
alias Config = std.process.Config;
I have a question about this example code;
import std.stdio;
string getByName(string name)
{
return "smth";
}
template getByName(string name)
{
enum
//string
getByName = getByName(name);
}
void main()
{
writeln(getByName!("name"));
}
This produces comp
24 matches
Mail list logo