Mikolaj Machowski wrote: > echo printf("%.0f", "0.4") > E807: expected Float argument for printf()
You mean (argument not a string): :echo printf("%.0f", 0.4) > echo printf("%d", "4-2") Same glitch. It's 4-2 not "4-2". > user friendly (eg. store and display 0.5 instead of 0.500000) Here is a workaround: :let f=1.0/2.0 :echo f :echo substitute(string(f),'0\+$','','') John --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---