دوال FormCalc للسلاسل والتاريخ والمالية

سكربتات calculate في XFA تدعم عائلات الدوال المنفذة ما وراء الحساب: دوال السلاسل وتحويل التاريخ ومكتبة المالية، مع حرفيات سلاسل وتعبيرات أنواع مختلطة

دوال السلاسل

القيم والمراجع توثّق Ref ودلالات نسخ القيم وإسناد المراجع وفصل null ووسائط الدوال ومقارنات هوية الكائنات والمقبضات المحتفظ بها عبر حركة النسخ المتكررة

Eval الديناميكي تنفذ نص المصدر عبر المترجم الأصلي وبيئة التشغيل العامة، بما يشمل متغيرات معلنة محليًا ودوالًا وحلقات وتغييرات حقول وطلبات locale واستجابات نقل مضيف مسجلة

Concat, Len, Left, Right, Substr, Replace, Lower, Upper, Trim, and Space operate on quoted literals and field references; numeric sub-expressions convert to text automatically

دوال التاريخ

The native scalar evaluator converts ISO YYYY-MM-DD text with Date2Num and Num2Date; FormCalc serial days use 1900-01-01 as day 1, and Date() returns today's serial

General execution with EnableJavaScript also supports locale pictures through Date2Num(value, picture, locale), Num2Date(serial, picture, locale), DateFmt, TimeFmt, IsoTime2Num, Time2Num, Num2Time, Num2GMTime and Time

In general execution, omitted Num2Date pictures now use the ambient locale's default pattern; pass "YYYY-MM-DD" explicitly to preserve earlier ISO output, and use IsoDate2Num for strict ISO input

دوال locale والصور في FormCalc توثّق المعاملات واختيار locale الموروث وتجاوزات localeSet المضمّنة والصور العددية/النصية والوحدات والترميز وكلمات الأعداد

بنود الصور المتقدمة توثّق الترميز العلمي والدقة الكسرية المعبَّر عنها وتواريخ الترتيب وأسابيع ISO وتنويعات الساعة والرموز العالمية والتحليل المركب في الأحداث العامة والحسابات والتحقق

دوال المالية

الدوال المالية الآن تتبع دلالات معاملات FormCalc في XFA في المقيِّم العددي الأصلي للحساب ومترجم الأحداث العام

الدالةالمعاملات والنتيجة
Pmt(principal, rate, periods)قسط قرض دوري موجب؛ وكل الوسائط يجب أن تكون موجبة
FV(payment, rate, periods)القيمة المستقبلية لأقساط متساوية؛ والمعدل الصفري يعيد القسط مضروبًا في الفترات
PV(payment, rate, periods)القيمة الحالية لأقساط متساوية؛ والمعدل الصفري يعيد القسط مضروبًا في الفترات
Rate(future, present, periods)المعدل المركب المطلوب لتنمية القيمة الحالية إلى القيمة المستقبلية
CTerm(rate, future, initial)الفترات المطلوبة لاستثمار أولي مركَّب
Term(payment, rate, future)الفترات المطلوبة لأقساط متساوية لبلوغ القيمة المستقبلية
Apr(principal, monthlyPayment, periods)معدل النسبة السنوي الذي يجده حلّ معدل شهري محدودًا بحدود
NPV(rate, cashFlow1, ...)تدفقات نقدية نهاية-الفترة مخفضةً بترتيب الوسائط
IPmt and PPmtInterest or principal paid for (principal, annualRate, monthlyPayment, firstMonth, months); month indices start at 1 and 0 also selects the first month

This corrects earlier spreadsheet-style argument ordering and sign handling: migrate Pmt(rate, periods, principal) to Pmt(principal, rate, periods) and expect a positive result; FV and PV now operate on periodic payments instead of a single initial or final amount

Rate now computes compound growth; NPer(rate, payment, future) remains a nonstandard extension equivalent to Term(payment, rate, future)

النطاقات المالية غير الصالحة ترفض الأحداث العامة ذريًا؛ والمقيِّم العددي للحساب يبلغ تعبيرًا فاشلًا، والتكرار يستهلك ميزانيتي العملية والزمن المهيأين

مكتبة الأحداث العامة

The general FormCalc event compiler supports case-insensitive built-in names, leading decimal literals, Null, scientific trigonometric functions, Pi, degree/radian conversion, Stuff and Str; Count includes empty text and omits null values, and all-null aggregates return null

Mod preserves the dividend sign in both evaluation paths; Mod(-13, 3) returns -1

الأنواع

Numeric evaluation stays Double-typed: a formula whose head is a string function resolves textually, and finance results convert back into numeric expressions so Round(Pmt(...), 2) works; any type mismatch still degrades to a blank value

المنطق الشرطي والمصفوفات المتكررة

Comparisons, And, Or, Not, booleans, and lazy If(condition, whenTrue, whenFalse) expressions provide bounded conditional control flow

Sum, Avg, Min, Max, and Count accept repeated numeric selectors such as rows[*].amount, while their ordinary argument-list forms continue to aggregate scalar expressions

طلبات النسخ الديناميكية

InstanceAdd(name, count) and InstanceRemove(name, index) invoke the validated instance callback configured by the caller and return the resulting instance count

راجع FormCalc وJavaScript في XFA محدودين بحدود لمسار QuickJS الاختياري والمصفوفات الموسومة وعزل بيئة التشغيل والميزانيات والقياسات

نقل HTTP الصريح

سكربتات الأحداث العامة تدعم Get وPost وPut دون حساسية حالة الأحرف عبر نقل مضيف تطبيق صريح؛ والوسائط تُحال بترتيبها والتطبيق يزود الاستجابة

هذه الدوال تتطلب EnableJavaScript وcallback HostTransport مهيأة في بيئة تشغيل widgets؛ والمقيِّم العددي الأصلي لا يجري طلبات شبكة