aboutsummaryrefslogtreecommitdiffstats
path: root/global-functions.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-11-30 12:01:59 +0100
committerGravatar Christian Hesse <mail@eworm.de>2023-11-30 13:51:57 +0100
commit495eff48de7f825ea013609f5de0c42330db163e (patch)
tree1fa6492aae514e91ed09627d96c0c5d20b9e5bfd /global-functions.rsc
parent080bef89a934980271a50eed25a494a0bc33d007 (diff)
global-functions: introduce $MAX
Diffstat (limited to 'global-functions.rsc')
-rw-r--r--global-functions.rsc7
1 files changed, 7 insertions, 0 deletions
diff --git a/global-functions.rsc b/global-functions.rsc
index 876f2cd..709a615 100644
--- a/global-functions.rsc
+++ b/global-functions.rsc
@@ -48,6 +48,7 @@
:global IsTimeSync;
:global LogPrintExit2;
:global LogPrintOnce;
+:global MAX;
:global MkDir;
:global NotificationFunctions;
:global ParseDate;
@@ -680,6 +681,12 @@
$LogPrintExit2 $Severity $Name $Message false;
}
+# get max value
+:set MAX do={
+ :if ($1 > $2) do={ :return $1; }
+ :return $2;
+}
+
# create directory
:set MkDir do={
:local Path [ :tostr $1 ];