On Monday, 9 August 2021 at 22:30:43 UTC, Ali Çehreli wrote:
Error: expression `FormatException("Expected one of %s, %x or
%X for pointer type.",
i saw this message too, and this is one of reasons of my original
question.
'%s' bad for pointer in my cases, because result often contains
somet
On Monday, 9 August 2021 at 19:58:03 UTC, novice2 wrote:
On Monday, 9 August 2021 at 19:53:48 UTC, Marcone wrote:
program not run.
compilation errors?
runtime errors?
Solved converting long and int.
On 8/9/21 3:46 PM, Adam D Ruppe wrote:
> The compile time checker [...] implementation is really really
> slow and pretty bloated in codegen too.
>
> My personal policy is to never use it.
My personal policy is to kindly ask you to fix it! :p
Ali
On Monday, 9 August 2021 at 22:30:43 UTC, Ali Çehreli wrote:
I don't know the reason but I suspect a bug in the compile-time
checker that involves .init values for arguments.
The compile time checker is pretty bad tbh, it just tries to ctfe
execute the given string and sees if it throws. That'
On Monday, 9 August 2021 at 16:32:13 UTC, Marcone wrote:
My main program need import a local module called mymodule.d.
How can I add this module using DUB? Thank you.
Let’s assume you just created a dub project in `myproject` with
`dub init`. Place `mymodule.d` alongside `app.d` in
`myproject
On 8/9/21 3:01 PM, Patrick Schluter wrote:
> On Monday, 9 August 2021 at 19:38:28 UTC, novice2 wrote:
>> format!"fmt"() and writef!"fmt"() templates
>> with compile-time checked format string
>> not accept %X for pointers,
>>
>> but format() and writef() accept it
>>
>> https://run.dlang.io/is/aQ
On Monday, 9 August 2021 at 22:01:18 UTC, Patrick Schluter wrote:
On Monday, 9 August 2021 at 19:38:28 UTC, novice2 wrote:
format!"fmt"() and writef!"fmt"() templates
with compile-time checked format string
not accept %X for pointers,
but format() and writef() accept it
https://run.dlang.io/is
On Monday, 9 August 2021 at 19:38:28 UTC, novice2 wrote:
format!"fmt"() and writef!"fmt"() templates
with compile-time checked format string
not accept %X for pointers,
but format() and writef() accept it
https://run.dlang.io/is/aQ05Ux
```
void main() {
import std.stdio: writefln;
int x
On Monday, 9 August 2021 at 19:53:48 UTC, Marcone wrote:
program not run.
compilation errors?
runtime errors?
When I compile program in Ly Windows x64 using dmd flag -m64 the
program not run.
How fix it?
format!"fmt"() and writef!"fmt"() templates
with compile-time checked format string
not accept %X for pointers,
but format() and writef() accept it
https://run.dlang.io/is/aQ05Ux
```
void main() {
import std.stdio: writefln;
int x;
writefln("%X", &x); //ok
writefln!"%s"(&x); //
On Monday, 9 August 2021 at 18:44:34 UTC, Paul Backus wrote:
On Monday, 9 August 2021 at 18:35:56 UTC, james.p.leblanc wrote:
```d
T[] foo_temp(Complex!T[])(T x, T y){
auto r = [x, x];
auto i = [y, y];
auto z = [ Complex!T(x, y), Complex!T(x,y) ];
return z;
}
```
void main(){
auto yd
On Monday, 9 August 2021 at 18:35:56 UTC, james.p.leblanc wrote:
```d
T[] foo_temp(Complex!T[])(T x, T y){
auto r = [x, x];
auto i = [y, y];
auto z = [ Complex!T(x, y), Complex!T(x,y) ];
return z;
}
```
void main(){
auto yd = foo_double(1.1, 2.2);
writeln(yd); ...
}
But, no ... I a
On Mon, Aug 09, 2021 at 06:35:56PM +, james.p.leblanc via
Digitalmars-d-learn wrote:
[...]
> > **T[] foo_temp(Complex!T[])(T x, T y){
> > auto r = [x, x];
> > auto i = [y, y];
> > auto z = [ Complex!T(x, y), Complex!T(x,y) ];
> > return z;
> > }**
Your syntax is wrong; the declaration
Suppose "foo_double" should return a complex double slice, with
double input args.
Similarly "foo_float" should return a float slice, with float
input args.
I thought it should be easy to parameterize with a template
taking a SINGLE
argument, either a"double" or "float" as follows:
import s
On Monday, 9 August 2021 at 16:37:10 UTC, Steven Schveighoffer
wrote:
On 8/9/21 12:32 PM, Marcone wrote:
My main program need import a local module called mymodule.d.
How can I add this module using DUB? Thank you.
You mean how to add a local project (that isn't on
code.dlang.org)?
`dub add
On Monday, 9 August 2021 at 16:37:10 UTC, Steven Schveighoffer
wrote:
On 8/9/21 12:32 PM, Marcone wrote:
My main program need import a local module called mymodule.d.
How can I add this module using DUB? Thank you.
You mean how to add a local project (that isn't on
code.dlang.org)?
`dub add
On 8/9/21 12:32 PM, Marcone wrote:
My main program need import a local module called mymodule.d.
How can I add this module using DUB? Thank you.
You mean how to add a local project (that isn't on code.dlang.org)?
`dub add-local .` inside the project directory.
I don't think you can add a file
My main program need import a local module called mymodule.d.
How can I add this module using DUB? Thank you.
Thank you very much! With your helps I created this function that
works fine:
// Function splitcommas()
string[] splitcommas(string text) nothrow {
try {
return
text.splitter!(Yes.keepSeparators)(regex("[^\\s\"']+|\"([^\"]*)\"|'([^']*)'")).array.map!(x => x.replace("\"", "
On Monday, 9 August 2021 at 02:47:40 UTC, Mathias LANG wrote:
On Sunday, 8 August 2021 at 18:36:02 UTC, vit wrote:
Hello, is there reason why elements of input range must be
copyable?
By design, not that I can think of. But it is assumed all over
the place, unfortunately. You can make your `f
I have a struct where I use a number of
"invariant(){enforce( blah, blah ...);}"
statements in the struct body to enforce certain
conditions on a struct member.
Since these "invariants" are only called when struct member
functions are exercised, must I overload each
individual operatio
22 matches
Mail list logo