On Wednesday, 21 December 2016 at 11:45:18 UTC, Eugene Wissner
wrote:
This prints 3 times "Destruct" with dmd 0.072.1. If I remove
the if block, it prints "Destruct" only 2 times - the behavior
I'm expecting. Why?
Possibly to do with named return value optimisation.
On Sunday, 4 December 2016 at 06:51:24 UTC, Tofu Ninja wrote:
So what is the proper way to get the hash of something now?
This question came up a few days ago:
http://forum.dlang.org/post/o1igoc$21ma$1...@digitalmars.com
Some DirectX methods return structs by value, but when I try
calling them I either get garbage or an access violation.
Usually COM methods return structs by pointer as a parameter, but
these are returning the struct as the actual return value, as in
this definition:
extern(Windows):
On Friday, 11 November 2016 at 20:55:52 UTC, Charles Hixson wrote:
Thank you. Unfortunately:
importstd.math;
...
assert(isNan (c.curActivation), "cell has unexpected
curActivation: %s".format(c.curActivation));
yields:
cell.d(292): Error: undefined identifier 'isNan', did
On Saturday, 5 November 2016 at 21:02:14 UTC, Adam D. Ruppe wrote:
coff2omf works with .obj files
Well, that's not what the docs say!
http://www.digitalmars.com/ctg/coff2omf.html
"The input files can be either object files (.obj) or library
files (.lib)"
Apparently you have to convert
On Saturday, 5 November 2016 at 16:13:18 UTC, Sarcross wrote:
If you're wondering, I did use the COFF2OMF tool on the library
I got from the C# code, which is why in WordFileParser.d you'll
see "pragma(lib, "Parser2")".
I have never had success trying to link with a lib file converted
by
On Monday, 24 October 2016 at 05:43:00 UTC, Andre Pany wrote:
Hi,
I try to get sqlite3.lib for 64 Bit windows os.
I tried implib with the def file and the 64 Bit dll:
implib sqlite3_implib.lib sqlite3.def /system
-> App crash (Windows 10)
With the dll file defined:
implib sqlite3_implib.lib
On Monday, 10 October 2016 at 14:14:08 UTC, Cleverson Casarin
Uliana wrote:
Hello, when I run a compiled Windows executable at the console,
letters outside the ascii range such as ç and ã do not display
propperly. Is there any d function to change the console code
page on the fly? My Windows
On Saturday, 8 October 2016 at 13:35:57 UTC, Cleverson Casarin
Uliana wrote:
Thank you Vadim and John, the PlaySound function is enough for
now. I'm not yet developing an app, just experimenting with
some exercises.
The wasapi library seems interesting, does it also implement a
On Saturday, 8 October 2016 at 01:00:20 UTC, Cleverson Casarin
Uliana wrote:
Hello all, starting to learn d, apreciating it so far. I'd like
to play/stop wave sound files assynchronously on Windows. Can I
get a module for that by installing a particular compiler, or
is there any package for it
On Wednesday, 5 October 2016 at 11:46:14 UTC, Adam D. Ruppe wrote:
On Wednesday, 5 October 2016 at 11:43:12 UTC, John C wrote:
Is there a way to convert something like AliasSeq!(int, int,
int) to an int[] - the opposite of aliasSeqOf?
If it is a legal array (matching types), just put
Is there a way to convert something like AliasSeq!(int, int, int)
to an int[] - the opposite of aliasSeqOf?
On Friday, 23 September 2016 at 18:20:24 UTC, Martin Nowak wrote:
Please file a bug report issues.dlang.org, shouldn't be
difficult to fix.
Done: https://issues.dlang.org/show_bug.cgi?id=16531
If I try to call the protected method of a superclass from inside
the body of a delegate, the compiler won't allow it.
void layoutTransaction(Control c, void delegate() action) {
// do stuff
action();
// do more stuff
}
class Control {
protected void onTextChanged() {}
}
class Label :
Sam Hu wrote:
From std.range:
enum StoppingPolicy
{
/// Stop when the shortest range is exhausted
shortest,
/// Stop when the longest range is exhausted
longest,
/// Require that all ranges are equal
requireSameLength,
}
From std.thread:( phobos webpage)
enum State;
A
Sam Hu wrote:
John C Wrote:
Sam Hu Wrote:
John C Wrote:
Ivan Boritsky wrote:
i work on a win32 application. i try to access my web camera.
when i use this api funtion;
capCreateCaptureWindow(cam, WS_VISIBLE + WS_CHILD, 10, 10,266, 252, hWnd, 0);
That should be: WS_VISIBLE | WS_CHILD.
i
Ivan Boritsky wrote:
i work on a win32 application. i try to access my web camera.
when i use this api funtion;
capCreateCaptureWindow(cam, WS_VISIBLE + WS_CHILD, 10, 10,266, 252, hWnd, 0);
That should be: WS_VISIBLE | WS_CHILD.
i get this error:
Error: undefined identifier
Sam Hu Wrote:
Stewart Gordon Wrote:
Read the source of std.date and see for yourself. If it's getting it
wrong, it suggests either your system is misconfigured or you're using
it wrongly. But since you still haven't posted your code, I still can't
comment further.
Stewart.
Sam Hu Wrote:
John C Wrote:
Object.factory requires a fully qualified class name, so if class Dog
resides in module animals, call Object.factory(animals.Dog).
It works now.Great!Thanks so much!
But...may I ask how do you know that?(requires full name).I went through the
object.di
Sam Hu Wrote:
In below code snippet:
class Dog
{
public void bark(){}
}
int main(string[] args)
{
auto obj=Object.factory(Dog);
Dog doggie=cast(Dog)obj;
doggie.bark;
return 0;
}
Compiled successfully but failed when run:
Object.Error:Access Violation.
I also tried
What strategies do library authors have for maintaining two versions of a their
code - one for D 1.0 and another for 2.0? When they make changes to one
version, do they manually copy them into the other branch? Or is there a way of
automating the process?
Version blocks don't seem to help
Sam Hu Wrote:
Thanks.The construct is clear now.
Still leaves Q1,that is ,the *if* expression after the template definition,I
want to learn more about the usage,where can I find more information?
It is in the spec: http://www.digitalmars.com/d/2.0/template.html#Constraint
Saaa Wrote:
import std.stdarg;
assert( _arguments[0] is typeid(int*) );
auto arg = va_arg!(int*)(_argptr);
*arg = 10;
Probably.
-- Daniel
Calling the following returns an Access Violation Error after
correctly writing the two lines.
void main()
{
int i;
get( file,
Sam Hu Wrote:
Hi Sivo John,
Thank you very much!!!The two versions all work.
But I am a bit confused with the key word *in* in both versions.
It's simple, really. Strings are immutable in D2. And in is equivalent to
immutable.
By the way, best to use wstring (for UTF-16) or string (for
gabrielsylar Wrote:
can anybody please tell me how to properly convert from void* to void[]
as the code below?
void[] get_bytes(int n) { return sqlite3_column_blob(stmt, n); }
return sqlite3_column_blob(stmt, n)[0 .. n];
Tyro[a.c.edwards] Wrote:
When I do this, how do I ensure that the program is able to locate the
font after extraction without installing it?
I think AddFontResource from the SDK will do that.
http://msdn.microsoft.com/en-us/library/dd183326(VS.85).aspx
BCS Wrote:
I find my self in need of a line drawing package. I need to pop a window
and draw lines and points. Text would be nice but I can live without it.
Most importantly, I need something that is dirt simple to get running. I
don't have time to dink around with libs (if I did have time
new Wrote:
hi,
how does one convert char[] to BSTR and back? i am looking to use a dll that
contains function such as
BSTR tester = gettest(BSTR *in, BSTR in1);
any help is appreciated.
wchar* bstr = SysAllocString(std.utf.toUTF16z(s));
and
char[] s = std.utf.toUTF8(bstr[0 ..
TSalm Wrote:
Hello,
I'm searching to have a generic comparator function.
I done this :
/* CODE */
import tango.io.Stdout;
/***
* Not for arrays
***/
int compare(T)(T o1,T o2)
{
static if ( is( T bar == class ) || is( T bar == struct
29 matches
Mail list logo