mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-06 06:42:03 +01:00
Contribution by Williams Lima
(Signed-off-by:WilliamsLima) Updated wikipage Getting a STRING from a NUMERIC object. (Signed-off-by:jocelyn). git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@2067 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -1,15 +1,17 @@
|
||||
[[Property:modification_date|Mon, 10 Sep 2018 09:09:25 GMT]]
|
||||
[[Property:publication_date|Mon, 10 Sep 2018 09:09:25 GMT]]
|
||||
[[Property:uuid|B74D374E-895C-4F22-B95F-656BD78ECD03]]
|
||||
[[Property:weight|1000]]
|
||||
[[Property:title|Getting a STRING from a NUMERIC object]]
|
||||
[[Property:link_title|NUMERIC to STRING]]
|
||||
Every class has the <code>out</code> method that can be used to get a text version of the object. For a lot of class, this method return internal informations that are not really useful for the end user. But for every <code>NUMERIC</code> class, the <code>out</code> method return a text representation of the number that the <code>NUMERIC</code> object represents.
|
||||
Every class has the `out` method that can be used to get a text version of the object. For a lot of classes, this method returns internal information that is not really useful for the end user. But for every `NUMERIC` class, the `out` method returns a text representation of the number that the `NUMERIC` object represents.
|
||||
|
||||
<code>
|
||||
print_integer(a_integer:INTEGER)
|
||||
-- Print the value of `a_integer'
|
||||
print_integer (a_integer: INTEGER)
|
||||
-- Print the value of `a_integer`.
|
||||
do
|
||||
print(a_integer.out + "%N")
|
||||
print (a_integer.out + "%N")
|
||||
end
|
||||
</code>
|
||||
|
||||
Note that for more advance convertion, you can also used convertion class like <code>FORMAT_DOUBLE</code>.
|
||||
Note that for more advanced conversion, you can also use a conversion class like `FORMAT_DOUBLE`.
|
||||
Reference in New Issue
Block a user