image

  • フォト Amazonギフト券
    ※この時計の時刻は、閲覧しているパソコンのものであり、必ずしも正確な時間とは限りません

検索

最近のトラックバック

無料ブログはココログ

« ピックアップ: JRubyのJavaME対応バージョン, 携帯電話でのオーディオツアー, etc... | トップページ | ピックアップ:メモリ価格が崩落, 世界が完全に思考停止する前に, etc... »

2007-11-25

gforth も評価中

gforth も試してみている。

$ port search forth
gforth   lang/gforth  0.6.2  fast and portable implementation of the ANS Forth language

$ sudo port install gforth

これまでと同じに まずは hello-world と階乗計算を。

$ cat hello.f
cat hello.f
¥ See http://www.delorie.com/gnu/docs/gforth/gforth_32.html      
¥     http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Characters-and-Strings-Tutorial.html#Characters%20and%20Strings%20Tutorial

: fac1 ( n -- n! ) recursive
dup 0> if
   dup 1- fac1 *
else
   drop 1
endif ;

: hello s" Hello, gforth!" ;

$ gforth hello.f
Gforth 0.6.2, Copyright (C) 1995-2003 Free Software Foundation, Inc.
Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
Type `bye' to exit
10 fac1  ok
. 3628800  ok
hello ok
type Hello, gforth! ok
100 fac1  ok
. 0  ok

Amazonギフト券

« ピックアップ: JRubyのJavaME対応バージョン, 携帯電話でのオーディオツアー, etc... | トップページ | ピックアップ:メモリ価格が崩落, 世界が完全に思考停止する前に, etc... »

コメント

この記事へのコメントは終了しました。

トラックバック


この記事へのトラックバック一覧です: gforth も評価中:

« ピックアップ: JRubyのJavaME対応バージョン, 携帯電話でのオーディオツアー, etc... | トップページ | ピックアップ:メモリ価格が崩落, 世界が完全に思考停止する前に, etc... »

mokuji

2013年12月
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

google

  • twitter
  • __
  • _
    Googleボットチェッカー

合わせて読む

  • 合わせて読む
    フィードメーター - katoy: cocolog あわせて読みたい

リンク