الفرق بين المراجعتين ل"Kotlin/Float/NEGATIVE INFINITY"

من موسوعة حسوب
< Kotlin‏ | Float
اذهب إلى التنقل اذهب إلى البحث
(مراجعة وتدقيق.)
سطر 1: سطر 1:
<noinclude>{{DISPLAYTITLE: الثابتة <code>Float.NEGATIVE_INFINITY</code> في لغة Kotlin}}</noinclude>
+
<noinclude>{{DISPLAYTITLE:الثابت <code>Float.NEGATIVE_INFINITY</code> في Kotlin}}</noinclude>
<code>NEGATIVE_INFINITY</code> هي ثابتة تحتوي قيمة اللانهاية السالبة للنوع <code>[[Kotlin/Float/index|Float]]</code>.
+
يمثل الثابت <code>Float.NEGATIVE_INFINITY</code> قيمة سالبة لانهائية (infinity) [[Kotlin/Float|لعدد عشري]] (float).
 
==البنية العامة==
 
==البنية العامة==
 
<syntaxhighlight lang="kotlin">
 
<syntaxhighlight lang="kotlin">
سطر 6: سطر 6:
  
 
</syntaxhighlight>
 
</syntaxhighlight>
 
==القيمة المُعادة==
 
عدد من النوع [[Kotlin/Float/index|<code>Float</code>]].
 
 
==أمثلة==
 
==أمثلة==
===استخدام الثابتة <code>NEGATIVE_INFINITY</code>===
+
استخدام الثابت <code>Float.NEGATIVE_INFINITY</code> لطباعة عدد عشري سالب لانهائي:<nowiki/><syntaxhighlight lang="kotlin">
<nowiki/><syntaxhighlight lang="kotlin">
+
fun main(args: Array<String>) {     
    fun main(args: Array<String>) {     
+
    println(Float.NEGATIVE_INFINITY )// -Infinity
        println(Float.NEGATIVE_INFINITY )// -Infinity
+
}
    }
 
 
</syntaxhighlight>
 
</syntaxhighlight>
==أنظر أيضًا ==
+
==انظر أيضًا ==
 
*<code>[[Kotlin/Float /POSITIVE INFINITY|POSITIVE_INFINITY]]</code>‎ : هي ثابتة تحتوي قيمة اللانهاية الموجبة للنوع <code>[[Kotlin/Float/index|Float]]</code>
 
*<code>[[Kotlin/Float /POSITIVE INFINITY|POSITIVE_INFINITY]]</code>‎ : هي ثابتة تحتوي قيمة اللانهاية الموجبة للنوع <code>[[Kotlin/Float/index|Float]]</code>
  
 
==مصادر==
 
==مصادر==
* [https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/-n-e-g-a-t-i-v-e_-i-n-f-i-n-i-t-y.html الثابتة Float.NEGATIVE_INFINITY في التوثيق الرسميّ للمكتبة القياسيّة في لغة Kotlin.]
+
* [https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/-n-e-g-a-t-i-v-e_-i-n-f-i-n-i-t-y.html صفحة الثابت Float.NEGATIVE_INFINITY في التوثيق الرسميّ للمكتبة القياسيّة في لغة Kotlin.]
 
[[تصنيف:Kotlin]]
 
[[تصنيف:Kotlin]]
 
[[تصنيف:Kotlin constant]]
 
[[تصنيف:Kotlin constant]]

مراجعة 07:25، 15 أغسطس 2018

يمثل الثابت Float.NEGATIVE_INFINITY قيمة سالبة لانهائية (infinity) لعدد عشري (float).

البنية العامة

val NEGATIVE_INFINITY: Float

أمثلة

استخدام الثابت Float.NEGATIVE_INFINITY لطباعة عدد عشري سالب لانهائي:

fun main(args: Array<String>) {    
    println(Float.NEGATIVE_INFINITY )// -Infinity
}

انظر أيضًا

  • POSITIVE_INFINITY‎ : هي ثابتة تحتوي قيمة اللانهاية الموجبة للنوع Float

مصادر