I use sprintf to convert float to string. The program is like below,

link printf

procedure main()
    k:= -0.833333333333

    m:= sprintf("%.5r",k)
    write(m)
end

But I found the output is 0.83333. 
Why it lose the minus sign? The book said "r" format is for the real numbers.

Thanks a lot for any help

Yijue



-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Unicon-group mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to