From Wikipedia, the free encyclopedia
|WikiProject Computing||(Rated Start-class)|
GNU Cim Link
Call by name
There is an error in this code. Real s; should be initialised by 0 to make sure the empty sum gives the correct result, unless Simula initialises all Real variables to 0.
Real Procedure Sigma (k, m, n, u); Name k, u; Integer k, m, n; Real u; Begin Real s:=0; k:= m; While k <= n Do Begin s:= s + u; k:= k + 1; End; Sigma:= s; End; — Preceding unsigned comment added by 18.104.22.168 (talk) 23:04, 26 January 2014 (UTC)