On Sunday, 2 July 2017 at 08:55:42 UTC, Basile B. wrote:
The second assert fails. Do you know why ?
pass your way, i've forgot the typeof()... everything is okay
actually.
Ahh, you need to initialise the D runtime before you call any
functions that depend on it (e.g. ones that interact with the
file system).
declare
extern "C" int rt_init();
in your c++ code and call it before ConsoleWrite and it should
work.
Honestly i did try this and it didnt correct
I played with some strange stuff that are allowed, i.e "super"
and "this" as BasicType, when I've reached this:
class B
{
super ringuard(){return null;}
void foo()
{
auto crate = ringuard();
pragma(msg, typeof(crate));
static assert(typeof(crate).stringof ==
On 2017-07-01 21:11, Damien Gibson wrote:
As well I only intended to use shared libraries not static ones...
Well, you can use shared libraries in two different way, dynamic linking
or dynamic loading.
Dynamic linking is when you declare your external symbols as usual and
you link with
02.07.2017 04:06, Ali Çehreli пишет:
On 07/01/2017 04:56 PM, crimaniak wrote:
> about very long error messages generated in some
> cases.
Please submit a bug report. The compiler may be able to abbreviate
certain types. For example, in this case most of the error message text
is values of
02.07.2017 09:52, H. S. Teoh via Digitalmars-d-learn пишет:
On Sun, Jul 02, 2017 at 12:49:30AM +, LeqxLeqx via Digitalmars-d-learn
wrote:
Hello!
How does one go about invoking a templated-variatic function such as
std.string.format with an array of objects?
For example:
string
Hi there,
consider the following simple use case:
import std.json;
float[] floats = [1,2,3];
JSONValue j = "{}".parseJSON;
j.object["floats"] = floats;
std.file.write("test.json", j.toString);
JSONValue jj = readText("test.json").parseJSON;
On Sun, Jul 02, 2017 at 11:38:34AM +0300, drug via Digitalmars-d-learn wrote:
> 02.07.2017 09:52, H. S. Teoh via Digitalmars-d-learn пишет:
[...]
> > Take a look at the docs that describe the "%(...%)" nested format
> > specifiers. For example:
> >
> > int[] arr = [ 1, 2, 3 ];
> >
Yuri wrote:
Hi there,
consider the following simple use case:
import std.json;
float[] floats = [1,2,3];
JSONValue j = "{}".parseJSON;
j.object["floats"] = floats;
std.file.write("test.json", j.toString);
JSONValue jj = readText("test.json").parseJSON;
Consider this snippet:
void main()
{
import std.stdio;
auto a = 6.2151;
auto b = a * 1;
auto c = cast(ulong)b;
writeln("a: ", typeof(a).stringof, " ", a);
writeln("b: ", typeof(b).stringof, " ", b);
writeln("c: ", typeof(c).stringof, " ", c);
auto x =
On Monday, 3 July 2017 at 03:50:14 UTC, Saurabh Das wrote:
Consider this snippet:
void main()
{
import std.stdio;
auto a = 6.2151;
auto b = a * 1;
auto c = cast(ulong)b;
writeln("a: ", typeof(a).stringof, " ", a);
writeln("b: ", typeof(b).stringof, " ", b);
On Monday, 3 July 2017 at 03:57:25 UTC, Basile B wrote:
On Monday, 3 July 2017 at 03:50:14 UTC, Saurabh Das wrote:
[...]
6.251 has no perfect double representation. It's real value is:
6.215099962483343551867E0
Hence when you cast to ulong after the product by 10_000, this
is
Anyone?
On Monday, 3 July 2017 at 02:51:49 UTC, Filip Bystricky wrote:
Anyone?
The answer is no.
Partial deallocation in an arbitrary fashion is not advisable.
And there are no standard library mechanisms for it.
On Monday, 3 July 2017 at 03:57:25 UTC, Basile B wrote:
6.251 has no perfect double representation. It's real value is:
I almost wonder if a BCD, fixed length or alternative for
floating point should be an option... Either library, or a hook
to change how the FPU works since doubles are
On Sunday, 2 July 2017 at 21:07:40 UTC, Yuri wrote:
It is expected to print '2' in the console, however an
exception is thrown:
std.json.JSONException@/build/ldc-I3nwWj/ldc-0.17.1/runtime/phobos/std/json.d(235):
JSONValue is not a floating type
I think it just read the json string of "1"
On Sunday, 2 July 2017 at 05:33:45 UTC, Damien Gibson wrote:
K im retarded... So I forgot the golden rule, debug libs with
debug app, release libs with release app.. I attempted loading
the debug version of dll with D again just to see what kinda
errors (may) come up there, sure enough there
On Sun, Jul 02, 2017 at 12:49:30AM +, LeqxLeqx via Digitalmars-d-learn
wrote:
> Hello!
>
> How does one go about invoking a templated-variatic function such as
> std.string.format with an array of objects?
>
> For example:
>
> string stringMyThing (string formatForMyThings, MyThing[]
18 matches
Mail list logo