On 10/12/11 13:02, ni va wrote:
this is what I want but imagine..
  ;               ;                 ; 48.00             ;
  ;               ;                 ; 32.50             ;
  ;               ;                 ; 15.00             ;
  ;               ;                 ; 59.40             ;
  ; 47.80         ;                 ;                   ;

That some field of colum don't have any numbers

Your first method fails because some field at position 3 are not feed:
let s=0|g/\d/let s+=str2float(split(getline('.'), ';')[3])

I'm not sure I understand what you mean by "are not feed".

I ran it on your sample data and it worked as I expected, treating the blanks in a column as 0.0 just as Excel does.

What version of Vim are you running? Floats were introduced in 7.2 so earlier versions

-tim


--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to