# الآلة الحاسبة

**الحاسبة** هو حقل في "**المحرر"** الكتلة التي تُفتح عند النقر على علامة التبويب التي تحمل الاسم نفسه. في هذا الحقل، يمكنك تنفيذ عمليات منطقية أو حسابية، وتشغيل دوال طلبات API من المنشئ، والتكاملات المتاحة.

يتيح لك تعيين (إعلان) متغير للعميل الذي دخل هذه الكتلة أو تحديث قيم المتغيرات الموجودة. هذه الوظيفة مفيدة بشكل خاص لإنشاء المسارات التحويلية أو تتبّع مصادر الزيارات.&#x20;

{% hint style="success" %}
تشرح المقالة التي تحمل العنوان نفسه كيف [تعمل مع المتغيرات.](/doc/ar/chatbot/functions/alaalh-alhasbh/variables.md)
{% endhint %}

<div data-with-frame="true"><figure><img src="/files/79c2125ec6505d6e96dd4f7d31e654f26cd14f18" alt="" width="375"><figcaption></figcaption></figure></div>

{% hint style="danger" %}
النقاط الرئيسية:

عند العمل باستخدام الحاسبة، لا يمكن لاسم المتغير أن يبدأ برقم.&#x20;

<mark style="color:red;">**غير صحيح:**</mark> <1\_name>\ <mark style="color:green;">**صحيح:**</mark> \<name\_1>.

لا يمكن أن يحتوي اسم المتغير على مسافات؛ استخدم الشرطة السفلية "\_" لفصل الكلمات.\ <mark style="color:red;">**غير صحيح:**</mark> \<Client Name>\ <mark style="color:green;">**صحيح:**</mark> \<Client\_Name>

للمزيد من التفاصيل، اقرأ المقال <mark style="color:red;">"المتغيرات."</mark> <mark style="color:red;"></mark><mark style="color:red;">**رابط**</mark>
{% endhint %}

## **كيفية استخدام الحاسبة في المنشئ**

{% hint style="danger" %}
لا حاجة لاستخدام **#{}** صيغة عند الإشارة إلى متغير.
{% endhint %}

مثال على حساب قيمة متغير في **الحاسبة** :

<div data-with-frame="true"><figure><img src="/files/9e6f389c94217c01773465dd1bb09188ca806bc6" alt="" width="563"><figcaption></figcaption></figure></div>

يمكن الإشارة إلى المتغيرات إما مباشرةً باستخدام أسمائها أو باستخدام **#{}** الصيغة. يتم تحويل جميع المتغيرات تلقائيًا إلى أعداد ذات فاصلة عائمة.

تدعم الحاسبة جميع العمليات المنطقية والحسابية اللازمة.

### التعليقات في الحاسبة

لإضافة تعليقات في **الحاسبة**، استخدم **/\* نص التعليق&#x20;*****/.*** تسمح لك هذه */* الصيغة بكتابة تعليقات أحادية السطر ومتعددة الأسطر:

<div data-with-frame="true"><figure><img src="/files/19d44c0c67557d1254391dc11b52346f2f5831aa" alt="" width="563"><figcaption></figcaption></figure></div>

تذكّر دائمًا إغلاق تعليقك باستخدام **\*/** الوسم في النهاية؛ <mark style="color:red;">**وإلا فسيستمر التعليق إلى السطر التالي.**</mark>

<div data-with-frame="true"><figure><img src="/files/69c9bdad0f7060f5389b5fa9781aa1a2abf1fa28" alt=""><figcaption></figcaption></figure></div>

تذكّر تضمين وسم الإغلاق للتعليق، حتى إذا كان التعليق هو السطر الأخير في حقل "الحاسبة".

{% hint style="warning" %}
لا تضع التعليقات مباشرةً أحدها بعد الآخر؛ يجب أن يكون هناك سطر فارغ واحد على الأقل بينها.
{% endhint %}

### **الثوابت**

"**E**": عدد أويلر e&#x20;

### **العوامل المدعومة**

"**+**": الجمع&#x20;

"**-**"': الطرح&#x20;

"**\***" *الضرب*&#x20;

"**/**": *القسمة*

"**%**'"*: باقي القسمة*&#x20;

"**^**" "**\*\***": الأس&#x20;

"**==**" "**!=**" "**>**" "**<**" "**>=**" "**<=**": عوامل المقارنة&#x20;

"**و**" "**AND**" "**&&**": AND المنطقي&#x20;

"**أو**" "**OR**" "**||**": OR المنطقي

{% hint style="warning" %} <mark style="color:red;">**مهم!**</mark> يجب كتابة المشغلات المنطقية مع المتغيرات في <mark style="color:red;">**"Variable"**</mark> الحقل، وليس في حقل "Trigger"!
{% endhint %}

على سبيل المثال، سيحدث الانتقال عبر الموصل إذا كان المتغير **Phone\_Number** معبأً. انظر الشكل أدناه:

<div data-with-frame="true"><figure><img src="/files/941cedaab78f3dea57a45cacdaedf81ab23f1a24" alt="" width="563"><figcaption></figcaption></figure></div>

{% hint style="warning" %}
ملاحظة!&#x20;

إذا قمت بمقارنة متغير بقيمة بين علامتي اقتباس، فتأكد من عدم وجود مسافات بين علامات الاقتباس والقيمة؛ وإلا فقد تفشل الكتلة في التشغيل أو تتصرف بشكل غير صحيح!

<mark style="color:green;">**صحيح**</mark> (بدون مسافة <mark style="color:red;">**قبل علامة الاقتباس**</mark> أو <mark style="color:red;">**بعد القيمة my\_new\_bot**</mark>):

<img src="/files/e2776b8439d2c31b212cc333c474e5a6efc059d1" alt="" data-size="original">

<mark style="color:red;">**غير صحيح**</mark> (مع وجود مسافة قبل علامة الاقتباس):

<img src="/files/8185b840446d58c5ddf6573e09a12499fa5375f6" alt="" data-size="original">

{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mavibot.ai/doc/ar/chatbot/functions/alaalh-alhasbh.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
