たとえば PHP で、 if ($hoge) { ... } とか書いてあったら、 $hoge がどんな値のときに if の中身が実行されるのか即答できますか。 こういう書き方は多くの言語で可能ですが、言語によって何が真で何が偽になるのかが異なるので、それぞれまとめてみました。 C言語 C言語には bool 型が無い。 0 (int) だけが偽となり、それ以外はすべて真となる。 NULL 定数は stddef.h で以下のように ((void*)0) と定義されているため、偽値として使える。 意見が分かれそうなところですが、個人的にはNULLを偽値として使用するは好きじゃないです。 #ifndef __cplsuplus #define NULL ((void*)0) #else #define NULL __null #endif C++ C++になると bool 型が出てくる。C と同
Welcome to 99 Bottles of Beer This Website holds a collection of the Song 99 Bottles of Beer programmed in different programming languages. Actually the song is represented in 1500 different programming languages and variations. For more detailed information refer to historic information. All these little programs generate the lyrics to the song 99 Bottles of Beer as an output. In case you do not
The speed, size and dependability of programming languages The Computer Language Benchmarks Game is a collection of 429 programs, consisting of 13 benchmark reimplemented across 33 programming languages. It is a fantastic resource if you are trying to compare programming languages quantitatively. Which, oddly, very few people seems to be interested in doing. The Benchmark Game spends a lot of effo
Check out the tutorial and other learning resources and examples available for MacRuby. 17-18 Apr 2009 » Golden Gate Ruby Conference San Francisco, CA, USA Rich Presents MacRuby & HotCocoa 15-16 May 2009 » Ruby on OS X Amsterdam, Holland, The Netherlands Laurent & Rich Presenting MacRuby and Hotcocoa 27-29 Aug 2009 » Lone Star Ruby Conference Austin, Texas, USA Rich Gives a MacRuby & HotCoco
Forth Dimensions The original scanning of Forth Dimensions was done by Ed Thelen in August 2003, for the gang at Harry's Hofbrau. Bob Smith provided the printed documents and assisted in scanning them. A separate scan was done by John Hall. In addition, Jay McKnight used the optical character recognition function of Adobe Acrobat to further process these image files, converting them into the searc
MML入門講座 MML講座 MMLって何?~書いてみよう! ストトンからの橋渡し MMLの基礎 基礎 表現力を高めよう ノートオン関連オプション トラックとチャンネルと時間 MIDIに関する知識を補強 音源操作 MIDI音源を駆使する為に 変数と関数 スクリプトを覚えて楽をする 制御構造を使って楽をしよう 繰り返しや条件分岐 リズムモード 複雑なリズム入力に 見やすいMMLへの提案 補足・あとがき 関数作成講座 関数を使うと何が出来る? 関数の概要 実際に関数を作ってみる 実際の作成方法 扉ページへ
class SmallSample var _random = Random() def randomString(length as int, alphabet as String) as String require length > 0 alphabet <> '' ensure result.length == length test utils = SmallSample() assert utils.randomString(5, 'ab').length == 5 s = utils.randomString(1000, 'a') for c in s, assert c == 'a' body sb = StringBuilder() for i in length c = alphabet[_random.next(alphabet.length)] sb.append(
Here is Version 3 of our paper (May 2010): Fun With Type Functions (version 3), Oleg Kiselyov, Ken Shan, and Simon Peyton Jones. This online version includes an Appendix that does not appear in the printed version. Slides (PDF) Source code which will appear in the proceedings of Tony Hoare's 75th birthday celebration. Abstract. Tony Hoare has always been a leader in writing down and proving proper
Flash上でFlashのコンパイルを出来るライブラリがそろっている言語。 私の中でHaxeとはそんな言語です。 今回はひとつ、頑張ってhaXeで俺言語を作るってのを書いていこうと思います。 どんな言語を作るかというと、Algol文法にLISPのマクロと同等の能力を持つ言語です。 で、今回の目標はflash上でflashをコンパイルして動かすことです。 ということで、まずは簡単な計算機を作ってみます。 なれていけば、章立てとかできるんでしょうけど、まだ日本語能力が足りないので、 その段階にありません。www ってことで、気の赴くままに、だらだらと書いてみます。 で、次に書くときにまとめつつ書いてみようと思います。 とりあえず、文章のブレーンストーミングからはじめて、それをあとでまとめようという。 スパゲッティ文章ですけどそのへんはお許しを。 と、その前にhaXeのインストールからはじめまし
About Self Self is a prototype-based dynamic object-oriented programming language, environment, and virtual machine centered around the principles of simplicity, uniformity, concreteness, and liveness. Self includes a programming language, a collection of objects defined in the Self language, and a programming environment built in Self for writing Self programs. The language and environment attemp
What is Jaskell? Jaskell is a functional scripting programming language that runs in JVM. The name "Jaskell" stands for Java-Haskell, Haskell being the famous pure functional programming language. Why Jaskell? There are already many cool scripting languages in jvm. Jython, JRuby, Groovy etc. They are all excellent and very practical scripting languages. Why yet another scripting language? Well. Ja
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く