作者: Tsutomu Hiroshima
日時: 2002/4/15(08:57)
バグがありました.訂正します.

/buf 16 string def
/total 0 def
/fd (%stdin) (r) file def
{ %loop
  /str fd buf readline pop def
  /num 0 def
  /sgn 1 def
  str 0 get 45 eq { %if
    /sgn -1 def
    /str str 1 str length 1 sub getinterval def
  } if
  str 0 get 43 eq { %if
    /str str 1 str length 1 sub getinterval def
  } if
  0 1 str length 1 sub { %for
    str exch get 48 sub
    /c exch def
    c 0 lt c 10 ge or { exit } if
    /num num 10 mul def
    /num num c add def
  } for
  /num num sgn mul def
  num 0 eq { exit } if
  /total total num add def
} loop
total ==
quit

-----------------------------
	廣島 勉
	(tsutomu@...)