作者: KIMURA Koichi
日時: 2008/3/02(13:09)
Bruce.です。

しまった。反応し忘れたことが。

Yさ さんは書きました:

> 例えば、今でも単純な繰り返し for(i=0; i<10; ++i){ ... } などに
> 変数名 i などを使うのがそれです。(起源は確かFORTRANの暗黙整数型変数だったかな)

プログラミングに関して言えばFORTRANが期限なのはほぼ確かなようですが、
数学分野において数式を記述するときの添え字(積分とかに登場するあれです)まで
さかのぼれるという意見もあります。

この辺はFe2+さんが詳しいかもしれません。
#と、クロスをあげてみる

>> ところでawkの場合、1レコードの最長文字数ってメモリ依存
>> なのでしょうか。
>  :
>> たとえば、全ファイル1レコードにしちゃってから後処理する、
>> みたいな富豪プログラミングも理論的にはできるのだろーか、
> 1レコードにできる文字数は処理系(≒awkインタプリタ本体)に依存している
> 気がしますが、文字数制限以内なら富豪プログラミングも可能でしょう。

awkの生まれをたどると、そこには今とは単位系が2つくらい違う(GB→KB)
世界があります。
そのため、プログラミング言語awkにも記述されてますが結構きつい制限があり
ます。
#具体的な数字は忘れました

が、gawkに限ればGNUの伝統(?)に従い、かなり以前のバージョンから
レコード長、レコード数などの制限はプラットフォームによるものに
なっています。

具体的な数値はこちら(LIMITATIONS)
  Copyright (C) 2005, 2006 Free Software Foundation, Inc.

  Copying and distribution of this file, with or without modification,
  are permitted in any medium without royalty provided the copyright
  notice and this notice are preserved.

This file describes limits of gawk on a Unix system (although it
is variable even then).  Non-Unix systems may have other limits.

# of fields in a record:  MAX_LONG
Length of input record:  MAX_INT
Length of output record:  unlimited
Size of a field:  MAX_INT
Size of a printf string:  MAX_INT
Size of a literal string:  MAX_INT
Characters in a character class:  2^(# of bits per byte)
# of file redirections:  unlimited
# of pipe redirections:  min(# of processes per user, # of open files)
double-precision floating point
Length of source line:  unlimited
Number of input records in one file: MAX_LONG
Number of input records total: MAX_LONG



が、ファイルの丸呑みをするのは結構大変ですよ :)

-- 
木村浩一/KIMURA Koichi
 I thought what I'd do was, I'd pretend I was one of those deaf-mutes or
shoud I?
 mail kbk at kt.rim.or.jp
 web  www.kt.rim.or.jp/~kbk/zakkicho/index.html