From a2290a6d7973753d12844160cefe52579b0126b2 Mon Sep 17 00:00:00 2001 From: Fabien Bodard Date: Wed, 16 Dec 2015 11:20:34 +0000 Subject: [PATCH] [GB.REPORT] * BUG: Adding a forgotten file. git-svn-id: svn://localhost/gambas/trunk@7532 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- comp/src/gb.report2/.info | 246 ++++++++++++++++++ comp/src/gb.report2/.list | 2 + .../.src/Evaluator/SimpleEval.class | 2 +- comp/src/gb.report2/FunctionsList | 46 ++++ 4 files changed, 295 insertions(+), 1 deletion(-) create mode 100644 comp/src/gb.report2/FunctionsList diff --git a/comp/src/gb.report2/.info b/comp/src/gb.report2/.info index 9dbf78663..2295be365 100644 --- a/comp/src/gb.report2/.info +++ b/comp/src/gb.report2/.info @@ -952,6 +952,9 @@ _Paint m (Page)i(X)f(Y)f(hControl)TControl;(DataIndex)i +#ReportEval +SimpleEval +C #ReportFrame ReportControl @@ -1554,6 +1557,249 @@ UnlockLayout m +#SimpleEval + +CA +Functions +R +String[] + +FunctionsArgsCount +V +Integer[] + +Data +p +v + +Formula +p +s + +Variables +r +CResult[] + +ErrorPos +r +i + +ErrorText +r +s + +Error +r +b + +Value +v +v + +:Data +: + +(Name)s +_init +M + + +_New +m + +[(Formula)s] +_get +m +SimpleEval +(Formula)s +Execute +m +b + +_IF +m +CResult +(Val1)CResult;(Val2)CResult;(Val3)CResult; +_ASIN +m +CResult +(Val1)CResult; +_ASINH +m +CResult +(Val1)CResult; +_ATAN +m +CResult +(Val1)CResult; +_ATAN2 +m +CResult +(Val1)CResult;(Val2)CResult; +_ATANH +m +CResult +(Val1)CResult; +_COS +m +CResult +(Val1)CResult; +_COSH +m +CResult +(Val1)CResult; +_DEG +m +CResult +(Val1)CResult; +_HYP +m +CResult +(Val1)CResult;(Val2)CResult; +_MAG +m +CResult +(Val1)CResult;(Val2)CResult; +_PI +m +CResult + +_SIN +m +CResult +(Val1)CResult; +_SINH +m +CResult +(Val1)CResult; +_TAN +m +CResult +(Val1)CResult; +_TANH +m +CResult +(Val1)CResult; +_RAD +m +CResult +(Val1)CResult; +_ABS +m +CResult +(Val1)CResult; +_CEIL +m +CResult +(Val1)CResult; +_FIX +m +CResult +(Val1)CResult; +_FLOOR +m +CResult +(Val1)CResult; +_FRAC +m +CResult +(Val1)CResult; +_INT +m +CResult +(Val1)CResult; +_MAX +m +CResult +(Val1)CResult;(Val2)CResult; +_MIN +m +CResult +(Val1)CResult;(Val2)CResult; +_ROUND +m +CResult +(Val1)CResult;(Val2)CResult; +_SGN +m +CResult +(Val1)CResult; +_ASC +m +CResult +(Val1)CResult; +_CHR +m +CResult +(Val1)CResult; +_COMP +m +CResult +(Val1)CResult;(Val2)CResult; +_INSTR +m +CResult +(Val1)CResult;(Val2)CResult; +_LCASE +m +CResult +(Val1)CResult; +_LEFT +m +CResult +(Val1)CResult;(Val2)CResult; +_LEN +m +CResult +(Val1)CResult; +_LTRIM +m +CResult +(Val1)CResult; +_MID +m +CResult +(Val1)CResult;(Val2)CResult;(Val3)CResult; +_QUOTE +m +CResult +(Val1)CResult; +_REPLACE +m +CResult +(Val1)CResult;(Val2)CResult;(Val3)CResult; +_RIGHT +m +CResult +(Val1)CResult;(Val2)CResult; +_RINSTR +m +CResult +(Val1)CResult;(Val2)CResult;(Val3)CResult; +_RTRIM +m +CResult +(Val1)CResult; +FSPACE +m +CResult +(Val1)CResult; +_STRING +m +CResult +(Val1)CResult;(Val2)CResult; +_TRIM +m +CResult +(Val1)CResult; +_UCASE +m +CResult +(Val1)CResult; +_UNQUOTE +m +CResult +(Val1)CResult; #_ReportBorderSide C diff --git a/comp/src/gb.report2/.list b/comp/src/gb.report2/.list index 1aeed4f42..cced3c816 100644 --- a/comp/src/gb.report2/.list +++ b/comp/src/gb.report2/.list @@ -5,6 +5,7 @@ ReportBrush! ReportContainer! ReportControl! ReportDrawingArea! +ReportEval ReportFrame! ReportHBox! ReportImage! @@ -21,6 +22,7 @@ ReportSvgImage! ReportTextLabel! ReportVBox! ReportView! +SimpleEval! _ReportBorderSide _ReportBoxShadow _ReportGridView_Column diff --git a/comp/src/gb.report2/.src/Evaluator/SimpleEval.class b/comp/src/gb.report2/.src/Evaluator/SimpleEval.class index 3c6519847..2340b6d55 100644 --- a/comp/src/gb.report2/.src/Evaluator/SimpleEval.class +++ b/comp/src/gb.report2/.src/Evaluator/SimpleEval.class @@ -374,7 +374,7 @@ Public Function Execute() As Boolean Inc rn nargs = op_arg_count(hVal.Value) If Stack.Count < nargs Then - Print "pas assez de valeur entrée" + 'Print "pas assez de valeur entrée" Return False Endif If hVal.isFunction Then diff --git a/comp/src/gb.report2/FunctionsList b/comp/src/gb.report2/FunctionsList new file mode 100644 index 000000000..aaca27f69 --- /dev/null +++ b/comp/src/gb.report2/FunctionsList @@ -0,0 +1,46 @@ +ASin|v|v|Computes the arc sine of an angle. +ASinh|v|v|Computes the hyperbolic arc sine of an angle. +ATan|v|v|Computes the arc tangent of an angle. +ATan2|vv|v|Computes the arc tangent of two numbers. +ATanh|v|v|Computes the hyperbolic arc tangent of an angle. +Cos|v|v|Computes the cosine of an angle. +Cosh|v|v|Computes the hyperbolic cosine of an angle. +Deg|v|v|Converts radians to degrees. +Hyp|v|v|Calculate the hypotenuse of a triangle. +Mag|vv|v|Computes the distance polar coordinate from two rectangular coordinates. +Pi||Returns π +Sin|v|v|Computes the sine of an angle. +Sinh|v|v|Computes the hyperbolic sine of an angle. +Tan|v|v|Computes the tangent of an angle. +Tanh|v|v|Computes the hyperbolic tangent of an angle. +Rad|v|v|Converts degrees to radians. +Abs|v|v|Return the absolute value of a number. +Ceil|v|v|Return the smallest integral value that is not less than a number. +Fix|v|v|Return the integer part of a number. +Floor|v|v|Return the largest integral value that is not greater than a number. +Frac|v|v|Return the fractional part of a number. +Int|v|v|Return the mathematical integer part of a number. +Max|vv|v|Return the maximum number. +Min|vv|v|Return the minimum number. +Round|vv|v|Round a number. +Sgn|v|v|Return the sign of a number. +Asc|s|v|Returns the ASCII code of a character in a string. +Chr|v|s|Returns a character from its ASCII code. +Comp|ss|v|Compares two strings. +InStr|ssv|v|Searches a string into another string. +LCase|s|s|Converts a string to lowercase. +Left|sv|s|Returns the first characters of a string. +Len|s|v|Returns the length of a string. +LTrim|s|s|Strips white spaces from the left of a string. +Mid|svv|s|Returns a part of a string. +Quote|s|s|Quotes a string. +Replace|ss|s|Replaces in a string a substring by another one. +Right|sv|s|Returns the last characters of a string. +RInstr|ssv|s|Searches a string into another string from its right. +RTrim|s|s|Strips white spaces from the right of a string. +Space|v|s|Returns a string containing only space. +String|sv|s|Returns the same string concatenated many times. +Trim|s|s|Strips white spaces from a string. +UCase|s|s|Converts a string to uppercase. +Unquote|s|s|Unquotes a string. +If|vaa|a|Conditionnal \ No newline at end of file