On Sunday, 8 March 2015 at 21:41:44 UTC, FG wrote:
Except that with this solution you will confuse empty strings
with ints.
The idea was to only make it memory-safe without union.
On Sun, 08 Mar 2015 18:57:37 +, Kagamin wrote:
> http://dpaste.dzfl.pl/2c8d4a7d9ef0 like this.
i hate annoying beginners too, but not to SUCH extent.
signature.asc
Description: PGP signature
On Sunday, 8 March 2015 at 21:41:44 UTC, FG wrote:
On 2015-03-08 at 20:26, Meta wrote:
On Sunday, 8 March 2015 at 18:57:38 UTC, Kagamin wrote:
http://dpaste.dzfl.pl/2c8d4a7d9ef0 like this.
What in the world is that code doing? I'm having a hard time
wrapping my head around this.
It's a tri
On 2015-03-08 at 20:26, Meta wrote:
On Sunday, 8 March 2015 at 18:57:38 UTC, Kagamin wrote:
http://dpaste.dzfl.pl/2c8d4a7d9ef0 like this.
What in the world is that code doing? I'm having a hard time wrapping my head
around this.
It's a trick to reuse string internals to store an int.
A stri
On Sunday, 8 March 2015 at 21:18:31 UTC, Max Klyga wrote:
On 2015-03-08 21:11:42 +, Paul said:
On Sunday, 8 March 2015 at 18:05:33 UTC, Dennis Ritchie wrote:
Is it possible to create such an array in which you can store
strings and numbers at the same time?
string-int[] array = [4
On Sunday, 8 March 2015 at 21:18:31 UTC, Max Klyga wrote:
OP is fighting a loosing battle in flame war on some obscure
forum. F# enthusiast trolls OP into solving stupid puzzles that
are trivial in F# (or any ML-family language) and clumsy in
C-family languages.
In language holy wars the only
On 2015-03-08 21:11:42 +, Paul said:
On Sunday, 8 March 2015 at 18:05:33 UTC, Dennis Ritchie wrote:
Is it possible to create such an array in which you can store strings
and numbers at the same time?
string-int[] array = [4, "five"];
As there's no mention of performanc
On Sunday, 8 March 2015 at 18:05:33 UTC, Dennis Ritchie wrote:
Is it possible to create such an array in which you can store
strings and numbers at the same time?
string-int[] array = [4, "five"];
As there's no mention of performance, what's wrong with a plain
old string
On Sunday, 8 March 2015 at 18:57:38 UTC, Kagamin wrote:
http://dpaste.dzfl.pl/2c8d4a7d9ef0 like this.
What in the world is that code doing? I'm having a hard time
wrapping my head around this.
On Sunday, 8 March 2015 at 18:54:43 UTC, Meta wrote:
On Sunday, 8 March 2015 at 18:38:02 UTC, Dennis Ritchie wrote:
On Sunday, 8 March 2015 at 18:18:15 UTC, Baz wrote:
import std.stdio;
import std.typecons;
alias T = Tuple!(string, int);
void main(string[] args)
{
T[] tarr;
tarr ~= T("a",
On Sunday, 8 March 2015 at 18:54:43 UTC, Meta wrote:
On Sunday, 8 March 2015 at 18:38:02 UTC, Dennis Ritchie wrote:
On Sunday, 8 March 2015 at 18:18:15 UTC, Baz wrote:
import std.stdio;
import std.typecons;
alias T = Tuple!(string, int);
void main(string[] args)
{
T[] tarr;
tarr ~= T("a",
http://dpaste.dzfl.pl/2c8d4a7d9ef0 like this.
On Sunday, 8 March 2015 at 18:38:02 UTC, Dennis Ritchie wrote:
On Sunday, 8 March 2015 at 18:18:15 UTC, Baz wrote:
import std.stdio;
import std.typecons;
alias T = Tuple!(string, int);
void main(string[] args)
{
T[] tarr;
tarr ~= T("a",65);
tarr ~= T("b",66);
writeln(tarr);
}
ay of union ?
string-int[] array;
a = [5, "v", 4, "t", "a", "b", 7, 9, 10, 15, "example"];
writeln(a); // [5, "v", 4, "t", "a", "b", 7, 9, 10, 15, "example"]
On Sunday, 8 March 2015 at 18:18:15 UTC, Baz wrote:
import std.stdio;
import std.typecons;
alias T = Tuple!(string, int);
void main(string[] args)
{
T[] tarr;
tarr ~= T("a",65);
tarr ~= T("b",66);
writeln(tarr);
}
[Tuple!(string, int)("a", 65), Tuple!(string, int)("b", 66
On Sunday, 8 March 2015 at 18:18:15 UTC, Baz wrote:
On Sunday, 8 March 2015 at 18:05:33 UTC, Dennis Ritchie wrote:
Is it possible to create such an array in which you can store
strings and numbers at the same time?
string-int[] array = [4, "five"];
using an array of tupl
On Sunday, 8 March 2015 at 18:05:33 UTC, Dennis Ritchie wrote:
Is it possible to create such an array in which you can store
strings and numbers at the same time?
string-int[] array = [4, "five"];
using an array of tuple it works:
import std.stdio;
import std.typecons;
alias
Is it possible to create such an array in which you can store
strings and numbers at the same time?
string-int[] array = [4, "five"];
18 matches
Mail list logo