I tried std.boxer,
Box[char[]][int] bb;
bb[0]["Month"] = box("Jan");
bb[0]["Profit"] = box(800);
bb[1]["Month"] = box("Jan");
bb[1]["Profit"] = box(200);
/*section work*/
writefln("%s",bb[0]["Month"]);
writefln("%d",bb[0]["Pro
GG wrote:
> Yes I can't use struct and/or enum because I can't know type and number of
> data that user could pass.
> In this example, we talk about Month, but it could be Minutes, week... So I
> try to program dynamic not static.
If you're trying to program dynamically, then you're using the
Yes I can't use struct and/or enum because I can't know type and number of data
that user could pass.
In this example, we talk about Month, but it could be Minutes, week... So I try
to program dynamic not static.
In fact I'm learning D thought a little project of graphic chart. I would like
to
Daniel Keep wrote:
> I got the following to work with Tango's Variant (dmd 1.051 + pre-0.99.9
> trunk):
>
> Variant[char[]][int] aa;
>
> aa[0] = typeof(aa[0]).init;
> aa[0]["Month"] = Variant("Jan");
> aa[0]["Profit"] = Variant(500);
>
> aa[1] = typeof(aa[0]).init;
> aa
GG wrote:
> I try to use variant as associative array with dmd2.039,
>
> Variant[char[]][int] aa;
> aa[0]["Month"] = "Jan";
> aa[0]["Profit"] = 500;
> aa[1]["Month"] = "Feb";
> aa[1]["Profit"] = 800;
>
> I got core.exception.rangeer...@main(28): Range violation
> I'm doing something wrong ? Or
On 10.02.2010 22:28, GG wrote:
> I try to use variant as associative array with dmd2.039,
>
> Variant[char[]][int] aa;
> aa[0]["Month"] = "Jan";
> aa[0]["Profit"] = 500;
> aa[1]["Month"] = "Feb";
> aa[1]["Profit"] = 800;
>
> I got core.exception.rangeer...@main(28): Range violation
> I'm doing s
On 10.02.2010 14:41, daoryn wrote:
>>
>> The buffer you are passing to receive is 0 bytes long. The
>> std.socket.Socket.receive function is a wrapper over the normal socket
>> function, and includes a test for an empty buffer.
>>
>> Daniel
>
> Ohh, I see. Thank you!
>
> I thought that the fun
On Thu, Feb 11, 2010 at 21:22, GG wrote:
> I tried your trick but I got "Error: cannot append type string to type
> VariantN!(maxSize)[]"
> on : vars ~= "Jan";
>
> I found this : http://d.puremagic.com/issues/show_bug.cgi?id=3692, the
> issue has been REOPEN.
>
> Thanks for helping !
>
Hmm, it
Sorry, but I ckicked on REPLY and it created a new thread after posting!?
I tried your trick but I got "Error: cannot append type string to type
VariantN!(maxSize)[]"
on : vars ~= "Jan";
I found this : http://d.puremagic.com/issues/show_bug.cgi?id=3692, the issue
has been REOPEN.
Thanks for helping !
On Wed, Feb 10, 2010 at 22:28, GG wrote:
> I try to use variant as associative array with dmd2.039,
>
> I got core.exception.rangeer...@main(28): Range violation
>
I had the same problem a few months ago. It's the same with Algebraic, too
bad.
alias TypeTuple!(int, string, double, char) Univers
I've been playing with templates recently and there's something I don't
quite get.
template Outer() {
template Inner(alias param) {
alias param Inner;
}
}
void main() {
long d;
Outer!().Inner!(d) = 4; // fails
}
Error: template instance cannot use local 'd' as paramete
Contato: pcnetsecur...@gmail.com
Contato: pcnetsecurity @ gmail.com
Assistência Técnica
Prestamos assistência técnica nos computadores de sua empresa ou residência, e
também possuímos uma equipe qualificada para fazer a manutenção no próprio
local.
- Contratos de Suporte e Manutenção
Reduza os
13 matches
Mail list logo