الفرق بين المراجعتين ل"Ruby/RangeError"
< Ruby
اذهب إلى التنقل
اذهب إلى البحث
(أنشأ الصفحة ب'<noinclude>{{DISPLAYTITLE: صفحة الصنف <code>RangeError</code> في روبي}}</noinclude> تصنيف: Ruby تصنيف: Ruby RangeError يمثل الصن...') |
|||
سطر 1: | سطر 1: | ||
− | <noinclude>{{DISPLAYTITLE: صفحة الصنف <code>RangeError</code> في روبي}}</noinclude> | + | يُطلق الاستثناء <code>RangeError</code> عندما تكون قيمة عددية معطاة خارج النطاق، مثلا:<syntaxhighlight lang="ruby"> |
+ | [1, 2, 3].drop(1 << 100) | ||
+ | |||
+ | </syntaxhighlight>سيُطلق الاستثناء:<syntaxhighlight lang="ruby"> | ||
+ | RangeError: bignum too big to convert into `long' | ||
+ | |||
+ | </syntaxhighlight><noinclude>{{DISPLAYTITLE: صفحة الصنف <code>RangeError</code> في روبي}}</noinclude> | ||
[[تصنيف: Ruby]] | [[تصنيف: Ruby]] | ||
[[تصنيف: Ruby RangeError]] | [[تصنيف: Ruby RangeError]] | ||
− | |||
− | |||
− | |||
− | |||
− | + | == مصادر == | |
− | == | + | *[http://ruby-doc.org/core-2.5.1/RangeError.html قسم الصنف RangeError في توثيق روبي الرسمي.] |
− | |||
− | *[http://ruby-doc.org/core-2.5.1/ |
مراجعة 20:45، 30 أكتوبر 2018
يُطلق الاستثناء RangeError
عندما تكون قيمة عددية معطاة خارج النطاق، مثلا:
[1, 2, 3].drop(1 << 100)
سيُطلق الاستثناء:
RangeError: bignum too big to convert into `long'