[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Fedora14よりD言語がサポートされたようです。 Fedora14でサポート去れているのは、コンパイラがldcで標準ライブラリはtangoです。 したがって、ldcパッケージとtango関係のパッケージをインストールする必要があります。これらは標準のリポジトリに含まれていますので、yum installコマンドを利用してインストールすることができます。
yum install ldc tango-* |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
tango.text.convert.Floatを使います。 text.convert.Float.toStringで実数をテキストに変換できます。 toStrong(i,10)とすると、10桁で出力します。ToString(i,10,1)とすると、指数付き10桁で出力します。
import tango.time.StopWatch,tango.io.Stdout,tango.text.convert.Float; int main() { auto a=toString(i,20,1); Stdout.format("time={0}",a).newline; } |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
gtkdをFedoraにインストールするには、http://repos.fedorapeople.org/repos/bioinfornatics/D/fedora-14/x86_64/にあるgtkd関連のパッケージをダウンロード/インストールすると良いでしょう。 http://repos.fedorapeople.org/から辿ってhttp://repos.fedorapeople.org/repos/bioinfornatics/D/fedora-D.repoをダウンロードし/etc/yum-repo.d/に置くことでリポジトリを追加してから、yum instalコマンドでインストールすることも出来ると思います。 http://dsource.org/projects/gtkd/wiki/CodeExamplesにあるHelloWorld
import gtk.MainWindow; import gtk.Label; import gtk.Main; void main(string[] args) { Main.init(args); MainWindow win = new MainWindow("Hello World"); win.setDefaultSize(200, 100); win.add(new Label("Hello World")); win.showAll(); Main.run(); } |
は
ldc HellowWorld.d -L-lgtkd -L-ldl
とすればコンパイルできます。
[Top] | [Contents] | [Index] | [ ? ] |
This document was generated by Katsuhiro DOBASHI on February, 1 2011 using texi2html 1.76.
The buttons in the navigation panels have the following meaning:
Button | Name | Go to | From 1.2.3 go to |
---|---|---|---|
[ < ] | Back | previous section in reading order | 1.2.2 |
[ > ] | Forward | next section in reading order | 1.2.4 |
[ << ] | FastBack | beginning of this chapter or previous chapter | 1 |
[ Up ] | Up | up section | 1.2 |
[ >> ] | FastForward | next chapter | 2 |
[Top] | Top | cover (top) of document | |
[Contents] | Contents | table of contents | |
[Index] | Index | index | |
[ ? ] | About | about (help) |
where the Example assumes that the current position is at Subsubsection One-Two-Three of a document of the following structure:
This document was generated by Katsuhiro DOBASHI on February, 1 2011 using texi2html 1.76.