[Eiffel-emacs-users] Another indentation problem
Brought to you by:
berenddeboer
From: Colin A. <col...@ho...> - 2007-01-16 17:45:26
|
there are problems indenting the following routine: add_observation (a_data, a_weight: DOUBLE) is -- Add a data point and it's associated weight to `Current'. local l_unit: DOUBLE_PAIR l_weighted: DOUBLE do l_weighted := a_data * a_weight if count = 0 then minimum := l_weighted maximum := l_weighted else minimum := l_weighted.min (minimum) maximum := l_weighted.max (maximum) end total := total + a_data square_total := square_total + (a_data * a_data) weight := weight + a_weight weighted_total := weighted_total + l_weighted create l_unit.make (a_data, a_weight) data_units.extend (l_unit) count := count + 1 order_statistics_saved := Void ensure order_statistics_cache_cleared: order_statistics_saved = Void end The first problem occurs with the assignment to weight. Removing the parentheses around the multiplication on the previous line yields correct indentation. The second problem is the indentation of the last line before the post-condition. _________________________________________________________________ MSN Hotmail is evolving check out the new Windows Live Mail http://ideas.live.com |