On Wed, 04 Jun 2014 05:35:18 +
Steve D via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
Is it possible to override std tuple's toString format?
so that
auto a = tuple(hello,1,2,3);
writeln(a);
prints
(hello, 1, 2, 3)
and not
On Wednesday, 4 June 2014 at 06:04:22 UTC, Jonathan M Davis via
Digitalmars-d-learn wrote:
toString is a member of Tuple, and there's no way to override
that externally.
...
Hi Jonathan,
Yeah, I'll probably just keep my locally cobbled version of
typecons.d in my path.
The other options
On Wednesday, 4 June 2014 at 00:07:35 UTC, Jesse Phillips wrote:
On Tuesday, 3 June 2014 at 22:10:06 UTC, bioinfornatics wrote:
I do not see why it fail in debug output we see that tuple
have a
field with given name.
Your generated output (short and formatted)
alias TL = Tuple!(int,x,
On Wed, 04 Jun 2014 06:25:53 +
Steve D via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
You would think the promise of OO and Inheritance
would make it easy and free us from hacks like this ;)
That would require using OO and inheritance, which has nothing to do with
Tuple.
On Wednesday, 4 June 2014 at 00:07:35 UTC, Jesse Phillips wrote:
On Tuesday, 3 June 2014 at 22:10:06 UTC, bioinfornatics wrote:
I do not see why it fail in debug output we see that tuple
have a
field with given name.
Your generated output (short and formatted)
alias TL = Tuple!(int,x,
LLVM never supported OMF. LDC uses msvcrt runtime, and MS claims
that whatever can link with msvcrt, it also can link with later
versions of msvcrt.
On Saturday, 31 May 2014 at 23:27:45 UTC, Qox wrote:
On Saturday, 31 May 2014 at 07:57:18 UTC, Kagamin wrote:
http://www.xomb.org/ ?
seems to be outdated, but its another OS written in D.
It's dead for only a year, the developer have probably graduated.
I take it the output looks something like this:
struct S {
int a;
}
S s;
s.a = 3;
void main() {
}
Hope this clears up this next problem. Module scope doesn't get
to utilize a variable, it can only initialize at compile-time.
I have the following code (on dpaste,
http://dpaste.dzfl.pl/636c04430a33):
enum : uint { a, b, c }
enum list = [a, b];
void foo(T...)()
{
pragma(msg, T[0].length); // fine
pragma(msg, T[0][0]); // fine
pragma(msg, T[0][1]); // fine
foreach(i; Iota!(0,T[0].length)) //
I've got a program that reads a text file line by line (using
std.stdio readln()) and I'd like to refer to the line number when
I send a message to stderr upon finding a mis-formatted line. Is
there a way to get the current line number? Of course, I could
create a counter and increment it
On 06/04/2014 05:05 PM, Robert Hathaway wrote:
I've got a program that reads a text file line by line (using std.stdio
readln())
Consider using byLine() instead. (Important: byLine uses an internal
buffer for the line; so, don't forget to make a copy if you want to
store the line for later
On Thursday, 5 June 2014 at 00:33:26 UTC, Ali Çehreli wrote:
On 06/04/2014 05:05 PM, Robert Hathaway wrote:
I've got a program that reads a text file line by line (using
std.stdio
readln())
Consider using byLine() instead. (Important: byLine uses an
internal buffer for the line; so, don't
12 matches
Mail list logo