You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 31, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: libscript/src/math.mlc
+48-9Lines changed: 48 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -40,8 +40,8 @@ public foreign handler MCMathEvalMaxNumber(in Left as number, in Right as number
40
40
public foreign handler MCMathEvalRandomReal(out Value as double) as undefined binds to "<builtin>"
41
41
42
42
public foreign handler MCMathEvalConvertBase(in Operand as string, in Source as int, in Target as int, out Value as string) as undefined binds to "<builtin>"
43
-
public foreign handler MCMathEvalConvertFromBase(in Operand as string, in Source as int, out Value as int) as undefined binds to "<builtin>"
44
-
public foreign handler MCMathEvalConvertToBase(in Operand as int, in Target as int, out Value as string) as undefined binds to "<builtin>"
43
+
public foreign handler MCMathEvalConvertToBase10(in Operand as string, in Source as int, out Value as int) as undefined binds to "<builtin>"
44
+
public foreign handler MCMathEvalConvertFromBase10(in Operand as int, in Target as int, out Value as string) as undefined binds to "<builtin>"
45
45
46
46
--
47
47
@@ -222,20 +222,59 @@ end syntax
222
222
223
223
--
224
224
225
+
/*
226
+
Summary: Converts the base of <Operand>
227
+
Operand: An expression that evaluates to a string.
228
+
Source: An expression that evaluates to an integer.
229
+
output: <Operand> converted to base 10.
230
+
231
+
Description:
232
+
Interprets a string in the desired base and converts it to decimal.
233
+
234
+
>*Note:* The source base must be an integer between 2 and 32.
235
+
*/
236
+
237
+
syntax BaseConvertFrom is left binary operator with precedence 1
Copy file name to clipboardExpand all lines: libscript/src/string.mlc
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -218,7 +218,7 @@ Description:
218
218
<Left> is greater than <Right> if and only if <Left> and <Right> are not equal, and the unicode codepoint of the first char in <Left> that is not equal to the corresponding char in <Right> is of greater value.
219
219
*/
220
220
221
-
syntax LessThan is neutral binary operator with precedence 1
221
+
syntax LessThan is neutral binary operator with precedence 3
222
222
<Left: Expression> "<" <Right: Expression>
223
223
begin
224
224
MCStringEvalIsLessThan(Left, Right, output)
@@ -235,7 +235,7 @@ Description:
235
235
<Left> is greater than <Right> if and only if <Left> and <Right> are not equal, and the unicode codepoint of the first char in <Left> that is not equal to the corresponding char in <Right> is of greater value.
236
236
*/
237
237
238
-
syntax GreaterThan is neutral binary operator with precedence 1
238
+
syntax GreaterThan is neutral binary operator with precedence 3
0 commit comments