On Friday, 11 January 2019 at 09:41:30 UTC, bauss wrote:
On Friday, 11 January 2019 at 08:25:41 UTC, Seb wrote:
On Friday, 11 January 2019 at 08:05:39 UTC, AndreasDavour
wrote:
Hi.
I've just started to learn some D, so maybe this question is
extremely stupid, but please bear with me.
[...]
On Friday, 11 September 2015 at 07:47:15 UTC, Mike McKee wrote:
[...]
The undefined references mean you haven't provided a linker path
to the GtkD libs.
Have you built the GtkD libraries?
Check out https://github.com/gtkd-developers/GtkD
On Friday, 11 September 2015 at 07:29:23 UTC, Mike McKee wrote:
On Friday, 11 September 2015 at 07:20:57 UTC, Mike James wrote:
It looks last keep you're missing an import path
(-Ipath_to_source). Check out
http://dlang.org/dmd-linux.html#switches
I tried this just now:
# dmd test1.d -
On Friday, 11 September 2015 at 07:13:22 UTC, Mike McKee wrote:
On Friday, 11 September 2015 at 06:53:07 UTC, Mike James wrote:
There's a Glade example in the demos/builder directory...
I'm having trouble installing GtkD on Ubuntu Linux 14.04. I did
the apt steps from here:
On Friday, 11 September 2015 at 06:45:07 UTC, Mike McKee wrote:
On Friday, 11 September 2015 at 06:00:39 UTC, Mike McKee wrote:
[...]
I think the start of this probably looks like the following,
but I'm not certain:
import gtk;
import gobject.Type;
import std.stdio;
import std.c.process;
i
On Saturday, 29 August 2015 at 20:15:53 UTC, Marc Schütz wrote:
Just cast to `Crumbs[]` directly:
import std.bitmanip;
import std.stdio;
import std.file;
struct Crumbs {
mixin(bitfields!(
ubyte, "one", 2,
ubyte, "two", 2,
ubyte, "t
On Thursday, 27 August 2015 at 09:00:02 UTC, Andrew Brown wrote:
Hi,
I need to read a binary file, and then process it two bits at a
time. But I'm a little stuck on the first step. So far I have:
import std.file;
import std.stdio;
void main(){
auto f = std.file.read("binaryfile");
auto g
On Monday, 20 April 2015 at 17:28:27 UTC, John Colvin wrote:
On Monday, 20 April 2015 at 17:24:30 UTC, bearophile wrote:
John Colvin:
struct LineStyle
{
enum NONE = "None";
enum SOLID = "Solid";
enum DASH = "Dash";
enum DOT = "Dot";
enum DASHDOT = "Dash Dot";
enum DASHDOTDOT = "Das
Here is a fragment of Java code from an SWT program...
public enum LineStyle {
NONE("None"),
SOLID("Solid"),
DASH("Dash"),
DOT("Dot"),
DASHDOT("Dash Dot"),
DASHDOTDOT("Dash Dot Dot");
public final String label;
private LineStyle(String label) {
this.label
On Friday, 17 October 2014 at 08:44:00 UTC, Paulo Pinto wrote:
On Friday, 17 October 2014 at 01:05:37 UTC, ketmar via
Digitalmars-d-learn wrote:
On Fri, 17 Oct 2014 00:52:14 +
MachineCode via Digitalmars-d-learn
wrote:
I don't understand. If at least it were C but java? why not D
itsel
On Wednesday, 1 October 2014 at 08:08:06 UTC, ketmar via
Digitalmars-d-learn wrote:
On Wed, 01 Oct 2014 07:45:48 +
Mike James via Digitalmars-d-learn
wrote:
so in the constructor...
this(size_t x, size_t y) {
mda = new MyDataArray[](x);
foreach(n, _; mda) mda[n].data.length
On Tuesday, 30 September 2014 at 15:57:58 UTC, Mike James wrote:
Hi,
How do I initialise a dynamic array of dynamic arrays?
struct MyData {
SysTime stamp;
short[] data;
this(size_t size) {
data = new short[size];
}
}
MyDataArray mda;
how to initialise mda?
mda = new MyDataArray
On Tuesday, 30 September 2014 at 17:22:32 UTC, Steven
Schveighoffer wrote:
On 9/30/14 12:40 PM, Mike James wrote:
On Tuesday, 30 September 2014 at 16:07:28 UTC, ketmar via
Digitalmars-d-learn wrote:
auto a = new int[][](42, 69);
...
You'll notice that it's actually a dynami
On Tuesday, 30 September 2014 at 16:07:28 UTC, ketmar via
Digitalmars-d-learn wrote:
On Tue, 30 Sep 2014 15:57:57 +
Mike James via Digitalmars-d-learn
wrote:
How do I initialise a dynamic array of dynamic arrays?
do you mean something like this: `int[][] a`? if yes, do this:
auto a
Hi,
How do I initialise a dynamic array of dynamic arrays?
struct MyData {
SysTime stamp;
short[] data;
this(size_t size) {
data = new short[size];
}
}
MyDataArray mda;
how to initialise mda?
mda = new MyDataArray ?
Thanks.
Regards, -=mike=-
014 at 07:19:53 UTC, Mike James
wrote:
//
Please file this issue also on the dgui
bibucket home page.
Kind regards
Andre
//
Done.
Regards, -=mike=-
//
Please file this issue also on the dgui
bibucket home page.
Kind regards
Andre
//
Done.
Regards, -=mike=-
Hi.
I've created a graphic button as per this example on the dgui
website:
import dgui.all;
class MyForm: Form
{
this()
{
text = "An Exception was thrown...";
size = Size(130, 100);
// Or use `Bitmap.fromFile`:
a
Hi,
Looking at the DMD Source Guide it says "The lexer transforms the
file into an array of tokens."
Why is this step taken instead of, say, just calling a function
that returns the next token (or however many required for the
look-ahead)?
Regards,
-=mike=-
On Monday, 4 August 2014 at 22:03:24 UTC, TJB wrote:
On Monday, 4 August 2014 at 21:58:09 UTC, maarten van damme via
Digitalmars-d-learn wrote:
I am a little bit confused as to what you want.
There is a command line example at dlang.org, and there exists
a program
(rdmd) that compiles several
I'm using DGUI (the one on bitbucket) and I can't work out how to
use the scrollbars. I've got them enabled but I can't work out
from the library files how to set the scale and read the
position. Also is there a way of turning off the vertical
scrollbar - the 'enable' turns them both on.
Any
On Wednesday, 26 February 2014 at 14:41:02 UTC, Adam D. Ruppe
wrote:
You'd do it the same way you do in C. On Windows, call
LoadLibrary, FreeLibrary, and GetProcAddress or the COM
functions. On Linux, the family of functions is dlopen, dlsym,
and dlclose.
Knowing the types to pass the functio
On Friday, 13 December 2013 at 12:09:59 UTC, John Colvin wrote:
On Friday, 13 December 2013 at 11:40:35 UTC, Mike James wrote:
Hi,
Is it possible to pass a string array to a string mixin e.g
template GenSomething(string foo, string[] bar){
some_kind_of_foreach(br: bar) {
const char[] foo
Hi,
Is it possible to pass a string array to a string mixin e.g
template GenSomething(string foo, string[] bar){
some_kind_of_foreach(br: bar) {
const char[] foo ~ br ~ ";\n";
}
}
and call:
mixin(GenSomething!("A", ["B", "C", "D"]));
would generate:
A.B;
A.C;
A.D;
Regards,
-=mike=-
On Sunday, 10 November 2013 at 12:05:45 UTC, Joseph Rushton
Wakeling wrote:
One of the challenges when working with unsigned types is that
automatic wraparound and implicit conversion can combine to
unpleasant effect.
Consider e.g.:
void foo(ulong n)
{
writeln(n);
}
v
"bearophile" wrote in message
news:pnwldlckpgrjvvuje...@forum.dlang.org...
My D translation:
import std.stdio;
void main() {
foreach (i; 0 .. 6) {
writeln("Loop: ", i);
try {
try {
if (i == 3)
break;
} final
Running on Windows 7, the default font is very thin and indistinct on my
machine - is there a system setting to change the default font?
regards, Mike.
I'm feeling the wind from Edsger Dijkstra spinning in his grave...
-=mike=-
"Nick Sabalausky" wrote in message
news:20130218205937.0768@unknown...
Consider these nested switches:
---
enum Foo {a, b}
enum Bar {bar}
auto foo = Foo.a;
auto bar = Bar.bar;
final swit
"Lubos Pintes" wrote in message news:k4skro$n6q$1...@digitalmars.com... Hi,
There are at least two interesting GUI libraries for Windows: DGUI and
DFL. But there seems to be no sample code for DFL. Does someone have any
samples for DFL?
And yes, I know about DWT, but it is a bit heavy-weight.
"Nick Sabalausky" wrote in message
news:j8kd11$25v1$1...@digitalmars.com...
> "Frédéric Galusik" wrote in message
> news:j8j77l$pfv$1...@digitalmars.com...
>> Hi,
>>
>> Can someone give me a clue on why nothing is printed to stdout ?
>>
>> I wish a list of files with their size.
>>
>> code:
>>
"Fab" wrote in message
news:i59i02$9...@digitalmars.com...
> Thank you. I am using
> my mobile phone to
> answer so it's pretty
> hard. I will try your
> tips later.
>
> ps: i wanted to say
> that delphi is slow
> and it seems to be
> old. in addition the
> bindings for sdl,
> allegro and so on a
I have some old serial comms code written in D1 + Tango and I'm going
through the process of re-writing it for D2 + Phobos. The old code used
Thread from the Tango library...
private Thread rxThread;
...
open() {
...
rxThread = new Thread(&rxHandler);
rxThread.start();
...
}
private
Brian Hay Wrote:
> I'm a bit green with D. I've done some basic D1 + Tango + Derelict stuff
> but am keen to learn more about D2 + Phobos.
>
> As a learning project I thought I'd like to try reading/writing data
> streams from/to RS232 and/or USB devices, something I've never done
> before in
Is there an optimum size for pagesize? What does the pagesize refer to?
I built DWT-Win and had to increase the pagesize to 4096 before it would build
successfully. I have just built Tango 0.99.8 with the same pagesize settings
and I got a warning that the pagesize was > 512. I reduced it to 512
Zarathustra Wrote:
> I found a WinIO library. Have you got any expreriance with that in Windows XP?
> By the way of course in the newer computers haven't got LPT but it is not a
> problem. I want to use LPT to control a machine.
>
> Mike James Wrote:
>
> > Zarat
Zarathustra Wrote:
> Have you got any idea how to manipulate LPT port in Windows XP with D?
Hi,
Try the dlportio driver. I've used it in the past with XP - PIC programmers,
etc. :-)
Regards, mike.
Frank Benoit Wrote:
> What does the pagesize mean? When is it needed to increase? What is the
> cost?
I would like to know too. I had to increase it to 4096 before I could get
DWT-WIN to build.
-=mike=-
Got it - so I should do this...
const char[] array1= "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
char[] array2 = new char[array1.length];
and then copy the contents of array1 into array2.
Regards,
-=mike=-
Forgot to mention - Windows XP.
Regards,
-=mike=-
Hi John,
I am using D1.038, dsss and Tango.
I've written a quick example but this one is even stranger...
module main;
import tango.io.Stdout;
int main() {
func1();
func2();
return 0;
}
void func1() {
char[] array1 = "ABCD";
char[
I have a function that uses 2 array strings defined similar to this...
const char[] array1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
char[] array2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
If I make a change to a char in array1 it also changes the same in array2.
But if I define the arrays as follows...
const char
Elrood Wrote:
> Win32
> /
> Windows
> \
> Win64
>
> Since there is no Win64 version for DMD (and this probably will not
> change for quite some time) version(Windows) and version(Win32) are
> pretty much interchangable. Unless your code is win32-specific, you
> should
In the predefined versions there are Windows and Win32 version identifiers -
what are the differences and are they interchangable?
Regards, Mike.
43 matches
Mail list logo