Home
Ruby
ActiveRecord
Array
CGI
Class
Collections
Database
Date
Design Patterns
Development
File Directory
GUI
Hash
Language Basics
Method
Network
Number
Rails
Range
Reflection
Statement
String
Threads
Time
Tk
Unit Test
Windows Platform
XML
printf « Development « Ruby
Ruby
Development
printf
1.
Use printf to print the output to your display (the default standard output device).
2.
printf("%.55f", 1.9)
3.
printf("%.55f", 1.8 + 0.1)
4.
printf with format
5.
printf prints its arguments under the control of a format string