الفرق بين المراجعتين ل"Ruby/InstructionSequence/disassemble i"
< Ruby | InstructionSequence
اذهب إلى التنقل
اذهب إلى البحث
(أنشأ الصفحة ب'<noinclude>{{DISPLAYTITLE: تابع النسخة <code>disassemble</code> الخاص بالصنف <code>InstructionSequence</code> في روبي}}</noinclude> تص...') |
جميل-بيلوني (نقاش | مساهمات) ط (مراجعة وتدقيق.) |
||
(مراجعة متوسطة واحدة بواسطة مستخدم واحد آخر غير معروضة) | |||
سطر 1: | سطر 1: | ||
− | <noinclude>{{DISPLAYTITLE: تابع النسخة <code>disassemble | + | <noinclude>{{DISPLAYTITLE: تابع النسخة <code>InstructionSequence.disassemble</code> في روبي}}</noinclude> |
[[تصنيف: Ruby]] | [[تصنيف: Ruby]] | ||
[[تصنيف: Ruby Method]] | [[تصنيف: Ruby Method]] | ||
[[تصنيف: Ruby InstructionSequence]] | [[تصنيف: Ruby InstructionSequence]] | ||
− | + | يعيد تابع النسخة <code>disassemble</code> [[Ruby/InstructionSequence|سلسلة التعليمات]] المعطاة على هيئة سلسلة نصية قابلة للقراءة. | |
==البنية العامة== | ==البنية العامة== | ||
− | <syntaxhighlight lang="ruby"> | + | <syntaxhighlight lang="ruby">disassemble → str</syntaxhighlight> |
− | + | ==القيمة المعادة== | |
− | == | + | تعاد [[Ruby/String|سلسلة نصية]] تحوي [[Ruby/InstructionSequence|سلسلة التعليمات]] بشكل قابل للقراءة. |
− | |||
− | |||
− | |||
− | |||
− | |||
==أمثلة== | ==أمثلة== | ||
− | + | مثال على استخدام التابع <code>disassemble:</code><syntaxhighlight lang="ruby">puts RubyVM::InstructionSequence.compile('1 + 2').disasm | |
− | + | </syntaxhighlight>الناتج سيكون:<syntaxhighlight lang="text">== disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>========== | |
− | مثال على استخدام التابع <code>disassemble</code> | ||
− | |||
− | |||
− | |||
− | puts RubyVM::InstructionSequence. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | == | ||
− | |||
− | |||
− | |||
− | |||
− | |||
0000 trace 1 ( 1) | 0000 trace 1 ( 1) | ||
0002 putobject 1 | 0002 putobject 1 | ||
0004 putobject 2 | 0004 putobject 2 | ||
0006 opt_plus <ic:1> | 0006 opt_plus <ic:1> | ||
− | 0008 | + | 0008 leave</syntaxhighlight> |
− | |||
− | |||
− | == انظر | + | == انظر أيضًا == |
− | *التابع <code>[[Ruby/InstructionSequence/disasm|disasm]]</code>: | + | *التابع <code>[[Ruby/InstructionSequence/disasm i|disasm]]</code>: يعيد [[Ruby/InstructionSequence|سلسلة التعليمات]] على هيئة سلسلة نصية قابلة للقراءة. |
==مصادر== | ==مصادر== | ||
− | *[http://ruby-doc.org/core-2.5.1/RubyVM/InstructionSequence.html#method-i-disassemble قسم | + | *[http://ruby-doc.org/core-2.5.1/RubyVM/InstructionSequence.html#method-i-disassemble قسم التابع disassemble في الصنف InstructionSequence في توثيق روبي الرسمي.] |
المراجعة الحالية بتاريخ 07:58، 4 ديسمبر 2018
يعيد تابع النسخة disassemble
سلسلة التعليمات المعطاة على هيئة سلسلة نصية قابلة للقراءة.
البنية العامة
disassemble → str
القيمة المعادة
تعاد سلسلة نصية تحوي سلسلة التعليمات بشكل قابل للقراءة.
أمثلة
مثال على استخدام التابع disassemble:
puts RubyVM::InstructionSequence.compile('1 + 2').disasm
الناتج سيكون:
== disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>==========
0000 trace 1 ( 1)
0002 putobject 1
0004 putobject 2
0006 opt_plus <ic:1>
0008 leave
انظر أيضًا
- التابع
disasm
: يعيد سلسلة التعليمات على هيئة سلسلة نصية قابلة للقراءة.