Skip to content

Commit

Permalink
global-functions: introduce $MAX
Browse files Browse the repository at this point in the history
  • Loading branch information
eworm-de committed Nov 30, 2023
1 parent 080bef8 commit 495eff4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions global-functions.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
:global IsTimeSync;
:global LogPrintExit2;
:global LogPrintOnce;
:global MAX;
:global MkDir;
:global NotificationFunctions;
:global ParseDate;
Expand Down Expand Up @@ -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 ];
Expand Down

0 comments on commit 495eff4

Please sign in to comment.