Merhaba,
Çalışırken karşılaştığım bir hatayı belirtmek isterim. http://ddili.org/ders/d/ozel_islevler.html sayfasındaki aşağıdaki kod şöyle bir hata veriyor.
Alıntı:
>Notice: As of Phobos 2.055, std.string.repeat has been deprecated It will be removed in February 2012. Please use std.array.replicate instead.
deneme.d(21): Error: function std.string.repeat!(string).repeat is deprecated
import std.stdio;
import std.conv;
import std.string;
struct XmlElemanı
{
string isim;
string girinti;
this(in string isim, in int düzey)
{
this.isim = isim;
this.girinti = girintiDizgisi(düzey);
writeln(girinti, '<', isim, '>');
}
}
string girintiDizgisi(in int girintiAdımı)
{
return repeat(" ", girintiAdımı * 2);
}
void main()
{
auto dersler = XmlElemanı("dersler", 0);
foreach (dersNumarası; 0 .. 2) {
auto ders =
XmlElemanı("ders" ~ to!string(dersNumarası), 1);
foreach (i; 0 .. 3) {
auto not = XmlElemanı("not", 2);
const int rasgeleNot = uniform(50, 101);
writeln(girintiDizgisi(3), rasgeleNot);
}
}
}
]
bilginize
--
[ Bu gönderi, http://ddili.org/forum'dan dönüştürülmüştür. ]