zabruk70 wrote:
Thank you ag0aep6g and ketmar!!
I will use additional outside align.
I want packing inside, you are right.
But i check result size with assert() and failed.
But for clearness...
I was thinked, that align not changes SIZE, but changes LOCATION.
I was thinked, that "align(X)
On Sunday, 26 March 2017 at 02:24:56 UTC, Jolly James wrote:
You can ignore the loop()-method. It is not called as the
application will never reach this statement, because it cannot,
because it crashes already in the listen()-method in
consequence of the exception that does not get caught by
On Sunday, 26 March 2017 at 01:22:24 UTC, bauss wrote:
On Sunday, 26 March 2017 at 00:34:03 UTC, Jolly James wrote:
[...]
This part:
catch (std.socket.SocketOSException e)
[...]
[...]
I know that inheritance stuff, but none (!) of them catches that
strange exception either. You can
On Sunday, 26 March 2017 at 00:34:03 UTC, Jolly James wrote:
How do you catch an std.socket.SocketOSException?
The following does not work, as the exception occurs anyway and
leads to a crash:
import ae.net.asockets;
void main(string[] args)
{
TcpServer tcp = new TcpServer();
On Saturday, 25 March 2017 at 23:36:07 UTC, kinke wrote:
On Saturday, 25 March 2017 at 22:45:22 UTC, ketmar wrote:
zabruk70 wrote:
[...]
`align(1) union Union1` will do the trick.
what you did is members packing. but the union itself is
padded to integer size too. i.e. internal `align`
How do you catch an std.socket.SocketOSException?
The following does not work, as the exception occurs anyway and
leads to a crash:
import ae.net.asockets;
void main(string[] args)
{
TcpServer tcp = new TcpServer();
try
{
tcp.listen(2345,
On Saturday, 25 March 2017 at 22:45:22 UTC, ketmar wrote:
zabruk70 wrote:
//DMD 2.073.1 and latest 2.075.0-master-972eaed
//Windows 7 32-bit
union Union1
{
align(1):
byte[5] bytes5;
struct
{
align(1):
char char1;
uint int1;
}
}
void main ()
{
import
On Saturday, 25 March 2017 at 22:54:30 UTC, zabruk70 wrote:
But for clearness...
I was thinked, that align not changes SIZE, but changes
LOCATION.
I was thinked, that "align(X) union Union1"
just force compiler to place Union1 on boundaries of X bytes...
In order for all Union1 instances in
Thank you ag0aep6g and ketmar!!
I will use additional outside align.
I want packing inside, you are right.
But i check result size with assert() and failed.
But for clearness...
I was thinked, that align not changes SIZE, but changes LOCATION.
I was thinked, that "align(X) union Union1"
just
zabruk70 wrote:
//DMD 2.073.1 and latest 2.075.0-master-972eaed
//Windows 7 32-bit
union Union1
{
align(1):
byte[5] bytes5;
struct
{
align(1):
char char1;
uint int1;
}
}
void main ()
{
import std.stdio: writefln;
writefln("Union1.sizeof=%d", Union1.sizeof);
On 03/25/2017 11:37 PM, zabruk70 wrote:
union Union1
{
align(1):
byte[5] bytes5;
struct
{
align(1):
char char1;
uint int1;
}
}
void main ()
{
import std.stdio: writefln;
writefln("Union1.sizeof=%d", Union1.sizeof); //prints 8, not 5
}
I'm not sure how the align
//DMD 2.073.1 and latest 2.075.0-master-972eaed
//Windows 7 32-bit
union Union1
{
align(1):
byte[5] bytes5;
struct
{
align(1):
char char1;
uint int1;
}
}
void main ()
{
import std.stdio: writefln;
writefln("Union1.sizeof=%d", Union1.sizeof); //prints 8, not 5
}
I
On Saturday, 25 March 2017 at 16:46:00 UTC, crimaniak wrote:
On Saturday, 25 March 2017 at 16:08:49 UTC, NotSpooky wrote:
__gshared implies static,...
Thanks! Confusing for me moment.
try this:
import std.stdio;
void main()
{
import std.stdio;
__gshared File f;
On Thursday, 2 March 2017 at 06:16:09 UTC, Patrick Schluter wrote:
Here [1] is the official git page listing all GUI clients for
different plartforms.
I use GitExtensions[2] and I like it a lot. It works very well
and all the complicated stuff can be done from the GUI
interface and also from
On Saturday, 25 March 2017 at 16:08:49 UTC, NotSpooky wrote:
__gshared implies static,...
Thanks! Confusing for me moment.
On Saturday, 25 March 2017 at 15:52:15 UTC, crimaniak wrote:
Simple File test:
void main()
{
import std.stdio;
File f = File("test.txt", "w");
f.writeln("hello");
}
All works as expected.
Now let's add __gshared:
void main()
{
import
Simple File test:
void main()
{
import std.stdio;
File f = File("test.txt", "w");
f.writeln("hello");
}
All works as expected.
Now let's add __gshared:
void main()
{
import std.stdio;
__gshared File f = File("test.txt", "w");
On Saturday, 25 March 2017 at 06:17:15 UTC, Nicholas Wilson wrote:
On Saturday, 25 March 2017 at 02:21:33 UTC, data pulverizer
wrote:
Thanks a lot ... I was half joking playing with the name
"mangling" but I appreciate your explanations and suggestions.
This is the internet, I can't tell if
Hi,
Sorry for the double post. I have asked a question at
Stackoverflow regarding this :
https://stackoverflow.com/questions/42992507/get-float-value-out-of-jsonvalue-in-dlang . I have a `rating` field that might have 3 which parses to JSONValue.integer or 3.4 which parses to
On Saturday, 25 March 2017 at 02:21:33 UTC, data pulverizer wrote:
Thanks a lot ... I was half joking playing with the name
"mangling" but I appreciate your explanations and suggestions.
This is the internet, I can't tell if you're a newb or sarcastic,
and given this is a learn forum I'm
20 matches
Mail list logo