# Test file for REMIND # # Use this file to test the date calculation routines # of the REMIND program by typing: # # ./test-rem # From WITHIN Remind source directory! # Should issue a warning fset year(x) 1 # Don't evaluate SATISFY expressions if reminder has expired REM Wed UNTIL 15 Feb 1991 SATISFY [trigdate() > '1990-01-01'] MSG wookie # bad AT REM AT 0:00 0:01 0:02 MSG foo # Includecmd INCLUDECMD echo REM 16 Feb 1991 MSG Blork INCLUDECMD echo REM 18 Feb 1991 MSG Blork # Includecmd with continuation line INCLUDECMD echo REM 18 Feb 1991 MSG This line is \ continued so there # This should work INCLUDECMD echo INCLUDECMD echo INCLUDECMD echo INCLUDECMD echo INCLUDECMD echo INCLUDECMD echo INCLUDECMD echo MSG Yippee # This should fail INCLUDECMD echo INCLUDECMD echo INCLUDECMD echo INCLUDECMD echo INCLUDECMD echo INCLUDECMD echo INCLUDECMD echo INCLUDECMD echo MSG Yippee REM MSG Today is [hebday(today())] [hebmon(today())] [hebyear(today())] fset _h(x, y) trigger(hebdate(x,y)) # Test case from Remind mailing list set mltest "a b" INCLUDECMD printf 'REM %s\n' [mltest] # Disabling RUN in an !includecmd INCLUDECMD !echo MSG foo INCLUDECMD !echo MSG foo INCLUDECMD !echo INCLUDECMD echo MSG foo INCLUDECMD !echo INCLUDECMD echo MSG foo INCLUDECMD !echo MSG foo INCLUDECMD !echo MSG foo # INCLUDECMD with RUN disabled RUN OFF INCLUDECMD echo MSG foo RUN ON INCLUDECMD echo MSG foo [_h(1, "Tishrey")] MSG Rosh Hashana 1 [_h(2, "Tishrey")] MSG Rosh Hashana 2 [_h(3, "Tishrey")] MSG Tzom Gedalia [_h(10, "Tishrey")] MSG Yom Kippur [_h(15, "Tishrey")] MSG Sukkot 1 [_h(25, "Kislev")] MSG Channuka [_h(10, "Tevet")] MSG Asara B'Tevet [_h(15, "Shvat")] MSG Tu B'Shvat [_h(15, "Adar A")] MSG Purim Katan [_h(14, "Adar")] MSG Purim [_h(15, "Nisan")] MSG Pesach [_h(27, "Nisan")] MSG Yom HaShoah [_h(4, "Iyar")] MSG Yom HaZikaron [_h(5, "Iyar")] MSG Yom Ha'atzmaut [_h(28, "Iyar")] MSG Yom Yerushalayim [_h(6, "Sivan")] MSG Shavuot [_h(9, "Av")] MSG Tish'a B'Av # Test some jahrzeit cases fset _i(x,y,z,a) trigger(hebdate(x,y,z,a)) [_i(30, "Heshvan", today(), 5759)] MSG Complete-Complete [_i(30, "Heshvan", today(), 5760)] MSG Complete-Defective [_i(30, "Heshvan", today(), 5761)] MSG Illegal [_i(30, "Kislev", today(), 5759)] MSG Complete-Complete [_i(30, "Kislev", today(), 5760)] MSG Complete-Defective [_i(30, "Kislev", today(), 5761)] MSG Illegal [_i(30, "Adar A", today(), 5755)] MSG Leap [_i(30, "Adar A", today(), 5756)] MSG Illegal [_i(29, "Adar A", today(), 5755)] MSG Leap [_i(29, "Adar A", today(), 5756)] MSG Illegal # This causes a parse error on version 03.01.01 REM 1990-01-01 SATISFY 1 # Test each possible case of the basic reminders. REM MSG Every Day REM 18 MSG Every 18th REM 15 MSG Every 15th REM Feb MSG February REM Jan MSG January REM March MSG March REM 13 Jan MSG 13 Jan REM 15 Feb MSG 15 Feb REM 28 Feb MSG 28 Feb REM 29 Feb MSG 29 Feb REM 5 Mar MSG 5 Mar REM 1990 MSG 1990 REM 1991 MSG 1991 REM 1992 MSG 1991 REM 1 1990 MSG 1 1990 REM 29 1991 MSG 29 1991 REM 29 1992 MSG 29 1992 REM 16 1991 MSG 16 1991 REM Jan 1990 MSG Jan 1990 REM Feb 1991 MSG Feb 1991 REM Dec 1991 MSG Dec 1991 REM May 1992 MSG May 1992 REM 1 Jan 1991 MSG 1 Jan 1991 REM 16 Feb 1991 MSG 16 Feb 1991 REM 29 Dec 1992 MSG 29 Dec 1992 REM Sun MSG Sun REM Fri Sat Tue MSG Fri Sat Tue REM Sun 16 MSG Sun 16 REM Mon Tue Wed Thu Fri 1 MSG Mon Tue Wed Thu Fri 1 REM Sun Feb MSG Sun Feb REM Mon Tue March MSG Mon Tue March REM Sun 16 Feb MSG Sun 16 Feb REM Mon Tue 10 March MSG Mon Tue 10 March REM Sat Sun 1991 MSG Sat Sun 1991 REM Mon Tue 1992 MSG Mon Tue 1992 REM Sun 16 1991 MSG Sun 16 1991 REM Mon Tue Wed Thu Fri 1 1992 MSG Mon Tue Wed Thu Fri 1 1992 REM Mon Feb 1991 MSG Mon Feb 1991 REM Tue Jan 1992 MSG Tue Jan 1992 REM Sun Mon 16 Feb 1991 MSG Sun Mon 16 Feb 1991 REM Tue 28 Jan 1992 MSG Tue 28 Jan 1992 # Try some Backs CLEAR-OMIT-CONTEXT REM 1 -1 OMIT sat sun MSG 1 -1 OMIT Sat Sun REM 1 --1 OMIT sat sun MSG 1 --1 OMIT Sat Sun OMIT 28 Feb REM 1 -1 OMIT sat sun MSG 1 -1 OMIT Sat Sun (28 Feb omitted) REM 1 --1 OMIT sat sun MSG 1 --1 OMIT Sat Sun (28 Feb omitted) CLEAR-OMIT-CONTEXT # Try out UNTIL REM Wed UNTIL 21 Feb 1991 MSG Wed UNTIL 21 Feb 1991 # Try playing with the OMIT context OMIT 28 Feb 1991 REM 1 Mar -1 MSG 1 mar -1 (28feb91 omitted) REM 1 Mar --1 MSG 1 mar --1 (28Feb91 omitted) REM 28 Feb BEFORE MSG 28 Feb BEFORE (28Feb91 omitted) REM 28 Feb SKIP MSG 28 Feb SKIP (28Feb91 omitted) REM 28 Feb AFTER MSG 28 Feb AFTER (28Feb91 omitted) PUSH-OMIT-CONTEXT CLEAR-OMIT-CONTEXT REM 1 Mar -1 MSG 1 mar -1 REM 1 Mar --1 MSG 1 mar --1 REM 28 Feb BEFORE MSG 28 Feb BEFORE REM 28 Feb SKIP MSG 28 Feb SKIP REM 28 Feb AFTER MSG 28 Feb AFTER POP-OMIT-CONTEXT REM 1 Mar -1 MSG 1 mar -1 (28feb91 omitted) REM 1 Mar --1 MSG 1 mar --1 (28Feb91 omitted) REM 28 Feb BEFORE MSG 28 Feb BEFORE (28Feb91 omitted) REM 28 Feb SKIP MSG 28 Feb SKIP (28Feb91 omitted) REM 28 Feb AFTER MSG 28 Feb AFTER (28Feb91 omitted) REM 13 March 1991 *1 UNTIL 19 March 1991 MSG 13-19 Mar 91 # Test BACK CLEAR-OMIT-CONTEXT REM 18 Feb 1991 +1 MSG 18 Feb 1991 +1 OMIT 17 Feb 1991 REM 18 Feb 1991 +1 MSG 18 Feb 1991 +1 (17Feb91 omitted) REM 18 Feb 1991 ++1 MSG 18 Feb 1991 ++1 (17Feb91 omitted) CLEAR-OMIT-CONTEXT # Test the scanfrom clause REM Fri SATISFY 1 OMIT [trigger(trigdate())] REM Fri after MSG 23 Feb 1991 CLEAR-OMIT-CONTEXT REM Fri SCANFROM [trigger(today()-7)] SATISFY 1 OMIT [trigger(trigdate())] REM Fri after MSG 16 Feb 1991 CLEAR-OMIT-CONTEXT REM Fri SCANFROM -7 SATISFY 1 OMIT [trigger(trigdate())] REM Fri after MSG 16 Feb 1991 CLEAR-OMIT-CONTEXT # Test omitfunc fset _ofunc(x) (day(x) < 7 || day(x) % 2) REM 1 March OMITFUNC _ofunc AFTER MSG OmitFunc Test REM 8 March OMITFUNC _ofunc -1 MSG OmitFunc Test 2 # omitfunc ignores local/global omits fset _ofunc(x) 0 OMIT 1 March OMIT 2 March 1991 REM 1 March OMIT Sun OMITFUNC _ofunc AFTER MSG Should trigger 1 March REM 1 March OMIT Sun AFTER MSG Should trigger 4 March # Test shorthand reminders REM 1991-02-28 MSG Feb 28 REM 1991/02/28@14:45 MSG Feb 28 REM Wed UNTIL 1991-01-01 MSG Expired REM Wed SCANFROM 1991-02-26 MSG SCANFROM CLEAR-OMIT-CONTEXT # Test ADDOMIT REM Mon 15 Feb ADDOMIT MSG Family Day REM Feb 18 AFTER MSG Should trigger on Feb 19 OMIT DUMP set $CalcUTC 0 set $DateTimeSep "@" set $DefaultColor "-1 -1 -1" set $DefaultPrio 5000 set $EndSent ".?!" set $EndSentIg "" + char(34) + "')]}>" set $FirstIndent 0 set $FoldYear 0 set $FormWidth 72 set $Location "Ottawa" set $MaxSatIter 150 set $MaxStringLen 65535 set $MinsFromUTC -300 set $SubsIndent 0 set $TimeSep ":" set $LatDeg 30 set $LatMin 30 set $LatSec 0 set $LongDeg -25 set $LongMin 15 set $LongSec 0 set a000 abs(1) set a001 abs(-1) set a002 asc("foo") set a003 baseyr() set a004 char(66,55,66,77,66) set a005 choose(3, "foo", "bar", "baz", "blech") set a006 coerce("string", 1) set a007 coerce("string", today()) set a008 coerce("string", 11:44) set a009 coerce("int", "badnews") set a010 coerce("int", "12") set a011 coerce("int", 11:44) set a012 coerce("int", today()) set a013 date(1992, 2, 2) set a014 date(1993, 2, 29) set a015 day(today()) set a016 daysinmon(2, 1991) set a017 daysinmon(2, 1992) set a018 defined("a017") set a019 defined("a019") set a020 filename() set a021 getenv("TEST_GETENV") set a022 hour(11:22) set a023 iif(1, 1, 0) set a024 iif(0, 1, 0) set a025 index("barfoobar", "foo") set a026 index("barfoobar", "bar", 2) set a027 isleap(today()) set a028 isleap(1992) omit [trigger(today())] set a030 isomitted(today()) clear set a029 isomitted(today()) set a031 lower("FOOBARBAZ") set a032 max(1, 2, 34, 1, 3) set a033 max("foo", "bar", "baz") set a034 max(today(), today()+1, today()-1) set a035 min(1, 2, 34, 1, 3) set a036 min("foo", "bar", "baz") set a037 min(today(), today()+1, today()-1) set a038 minute(11:33) set a039 mon(today()) set a040 monnum(today()) set a041 ord(3) set a042 ord(4) set a043 ostype() set a044 plural(2) set a045 plural(2, "ies") set a046 plural(2, "y", "ies") set a047 sgn(-2) set a048 shell("echo foo") set a049 strlen("sadjflkhsldkfhsdlfjhk") set a050 substr(a049, 2) set a051 substr(a050, 2, 6) set a052 time(1+2, 3+4) rem 10 jan 1992 AT 11:22 CAL set a053 trigdate() set a054 trigtime() set a055 trigvalid() set a056 upper("sdfjhsdf ksjdfh kjsdfh ksjdfh") set a057 value("a05"+"6") set a058 version() set a059 wkday(today()) set a060 wkdaynum(today()) set a061 year(today()) set a062 1+2*(3+4-(5*7/2)) set a063 1>=2 set a064 1<2 || 3 > 4 set a065 1 && 1 set a066 !a065 set a067 typeof(2) set a068 typeof("foo") set a069 typeof(11:33) set a070 typeof(today()) fset g(x,y) max(x,y) fset h(x,y) min(g(x+y, x*y), g(x-y, x/y)) set a071 g(1, 2) set a072 h(2, 3) set a073 h("foo", 11:33) set a074 dosubst("%a %b %c %d %e %f %g %h", '1992/5/5') msg [a074]% set a075 dosubst("%i %j %k %l %m %n %o %p", '1992/5/5') msg [a075]% set a076 dosubst("%q %r %s %t %u %v %w %x", '1992/5/5') msg [a076]% set a074 dosubst("%*a %*b %*c %*d %*e %*f %*g %*h", '1992/5/5') msg [a074]% set a075 dosubst("%*i %*j %*k %*l %*m %*n %*o %*p", '1992/5/5') msg [a075]% set a076 dosubst("%*q %*r %*s %*t %*u %*v %*w %*x", '1992/5/5') msg [a076]% set a077 dosubst("%*y %*z", '1992/5/5') msg [a077]% set a074 dosubst("%A %B %C %D %E %F %G %H", '1992/5/5') msg [a074]% set a075 dosubst("%I %J %K %L %M %N %O %P", '1992/5/5') msg [a075]% set a076 dosubst("%Q %R %S %T %U %V %W %X", '1992/5/5') msg [a076]% set a077 dosubst("%Y %Z", '1992/5/5') msg [a077]% set a074 dosubst("%*A %*B %*C %*D %*E %*F %*G %*H", '1992/5/5') msg [a074]% set a075 dosubst("%*I %*J %*K %*L %*M %*N %*O %*P", '1992/5/5') msg [a075]% set a076 dosubst("%*Q %*R %*S %*T %*U %*V %*W %*X", '1992/5/5') msg [a076]% set a077 dosubst("%*Y %*Z", '1992/5/5') msg [a077]% set a078 easterdate(today()) set a079 easterdate(1992) set a080 easterdate(1995) set a081 "" OMIT 1991-03-11 set a082 slide('1991-03-01', 7, "Sat", "Sun") set a083 slide('1991-04-01', -7, "Sat") set a084 nonomitted('1991-03-01', '1991-03-13', "Sat", "Sun") set a085 nonomitted('1991-03-24', '1991-04-01', "Sat") REM 2010-09-03 +3 -4 UNTIL 2012-01-01 PRIORITY 7 *14 MSG foo set a086 trigback() set a087 trigdelta() set a088 trigrep() set a089 triguntil() set a090 trigscanfrom() set a091 trigfrom() set a092 trigpriority() set a093 trigtimedelta() set a094 trigtimerep() set a095 trigduration() REM Mon Wed FROM 2010-09-03 ++3 --4 MSG foo set a096 trigback() set a097 trigdelta() set a098 trigrep() set a099 triguntil() set a100 trigscanfrom() set a101 trigfrom() set a102 trigpriority() set a103 trigtimedelta() set a104 trigtimerep() set a105 trigduration() REM 2010-09-03 +3 -4 UNTIL 2012-01-01 PRIORITY 7 *14 AT 14:41 +15 *2 DURATION 213 MSG foo set a106 trigback() set a107 trigdelta() set a108 trigrep() set a109 triguntil() set a110 trigscanfrom() set a111 trigfrom() set a112 trigpriority() set a113 trigtimedelta() set a114 trigtimerep() set a115 trigduration() REM Mon Wed FROM 2010-09-03 ++3 --4 AT 14:44 MSG foo set a116 trigback() set a117 trigdelta() set a118 trigrep() set a119 triguntil() set a120 trigscanfrom() set a121 trigfrom() set a122 trigpriority() set a123 trigtimedelta() set a124 trigtimerep() set a125 trigduration() # Test adding TIME+TIME and DATETIME+TIME set a126 11:00 + 3:00 set a127 23:00 + 5:30 set a128 '2018-02-03@10:00' + 6:45 set a129 23:30 + '2019-02-02@16:44' # Multi-day reminder REM 13 AT 16:00 DURATION 72:00 MSG 72-hour event set a130 trigdate() set a131 trigtime() set a132 trigdatetime() set a133 trigduration() set a134 trigeventstart() set a135 trigeventduration() set a136 stdout() # These will issue errors REM Mon OMIT Mon SKIP MSG Never ever ever... REM Mon SATISFY [wkdaynum($T) == 3] MSG Nope nope... # These will just silently not trigger REM MAYBE-UNCOMPUTABLE Mon OMIT Mon SKIP MSG Never ever ever... REM MAYBE-UNCOMPUTABLE Mon SATISFY [wkdaynum($T) == 3] MSG Nope nope... dump dump $ msg [$April]% msg [$August]% msg [$CalcUTC]% msg [$CalMode]% msg [$Daemon]% msg [$DateSep]% msg [$DateTimeSep]% msg [$December]% msg [$DefaultColor]% msg [$DefaultPrio]% msg [$DefaultTDelta]% msg [$DeltaOffset]% msg [$DontFork]% msg [$DontQueue]% msg [$DontTrigAts]% msg [$EndSent]% msg [$EndSentIg]% msg [$February]% msg [$FirstIndent]% msg [$FoldYear]% msg [$FormWidth]% msg [$Friday]% msg [$HushMode]% msg [$IgnoreOnce]% msg [$InfDelta]% msg [$IntMax]% msg [$IntMin]% msg [$January]% msg [$July]% msg [$June]% msg [$LatDeg]% msg [$Latitude]% msg [$LatMin]% msg [$LatSec]% msg [$Location]% msg [$LongDeg]% msg [$Longitude]% msg [$LongMin]% msg [$LongSec]% msg [$March]% msg [$MaxSatIter]% msg [$MaxStringLen]% msg [$May]% msg [$MinsFromUTC]% msg [$Monday]% msg [$NextMode]% msg [$November]% msg [$NumQueued]% msg [$NumTrig]% msg [$October]% msg [$PrefixLineNo]% msg [$PSCal]% msg [$RunOff]% msg [$Saturday]% msg [$September]% msg [$SimpleCal]% msg [$SortByDate]% msg [$SortByPrio]% msg [$SortByTime]% msg [$SubsIndent]% msg [$Sunday]% msg [$T]% msg [$Td]% msg [$Thursday]% msg [$TimeSep]% msg [$Tm]% msg [$Tuesday]% msg [$Tw]% msg [$Ty]% msg [$U]% msg [$Ud]% msg [$Um]% msg [$UntimedFirst]% msg [$Uw]% msg [$Uy]% msg [$Wednesday]% # Diagnose until before start date, only for non-constant expressions and # fully-specified start date REM Mon 1992 UNTIL 1991-01-01 MSG Not diagnosed - not fully-specified start REM 1992-01-01 *1 UNTIL 1991-12-31 MSG Diagnosed set x '1992-01-01' REM [x] *1 UNTIL 1991-12-31 MSG Not diagnosed - nonconst expression REM MON FROM 1992-01-01 UNTIL 1991-12-31 Diagnosed REM MON SCANFROM 1992-01-01 UNTIL 1991-12-31 Diagnosed REM MON FROM [x] UNTIL 1991-12-31 Not diagnosed REM MON SCANFROM [x] UNTIL 1991-12-31 Not diagnosed REM 1992-01-01 UNTIL 1992-02-02 MSG Diagnosed REM [x] UNTIL 1992-02-02 MSG Diagnosed dump $aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa OMIT 2010-09-03 THROUGH 2010-09-15 OMIT December 25 MSG X # Next should give a parse error OMIT 26 Dec 2010 THROUGH 27 Dec 2010 MSG This is not legal OMIT DUMP # Regression test for bugfix in Hebrew calendar Adar jahrzeit [_i(14, "Adar", today(), 5761)] MSG Purim # Regression test for bug found by Larry Hynes REM SATISFY [day(trigdate()-25) == 14] MSG Foo # Check combo of SATISFY and long-duration events REM 14 SATISFY [$Tw == 4] MSG Thursday, the 14th REM 14 AT 16:00 DURATION 8:00 SATISFY [$Tw == 4] MSG Thursday, the 14th REM 14 AT 16:00 DURATION 8:01 SATISFY [$Tw == 4] MSG Thursday, the 14th REM 14 AT 16:00 DURATION 32:00 SATISFY [$Tw == 4] MSG Thursday, the 14th REM 14 AT 16:00 DURATION 32:01 SATISFY [$Tw == 4] MSG Thursday, the 14th REM 14 AT 16:00 DURATION 40:00 SATISFY [$Tw == 4] MSG Thursday, the 14th # This is now an error REM DURATION 15:00 MSG Should fail... need AT if you have DURATION. # Parsing of AM/PM times REM AT 0:00am MSG foo 0a REM AT 1:00AM MSG foo 1a REM AT 2:00am MSG foo 2a REM AT 3:00AM MSG foo 3a REM AT 4:00am MSG foo 4a REM AT 5:00AM MSG foo 5a REM AT 6:00am MSG foo 6a REM AT 7:00AM MSG foo 7a REM AT 8:00am MSG foo 8a REM AT 9:00AM MSG foo 9a REM AT 10:00am MSG foo 10a REM AT 11:00AM MSG foo 11a REM AT 12:00am MSG foo 12a REM AT 13:00AM MSG foo 13a REM AT 0:00pm MSG foo 0p REM AT 1:00PM MSG foo 1p REM AT 2:00pm MSG foo 2p REM AT 3:00PM MSG foo 3p REM AT 4:00pm MSG foo 4p REM AT 5:00PM MSG foo 5p REM AT 6:00pm MSG foo 6p REM AT 7:00PM MSG foo 7p REM AT 8:00pm MSG foo 8p REM AT 9:00PM MSG foo 9p REM AT 10:00pm MSG foo 10p REM AT 11:00PM MSG foo 11p REM AT 12:00pm MSG foo 12p REM AT 13:00PM MSG foo 13p DEBUG +x SET x 0:00am + 0 SET x 1:00AM + 0 SET x 2:00am + 0 SET x 3:00AM + 0 SET x 4:00am + 0 SET x 5:00AM + 0 SET x 6:00am + 0 SET x 7:00AM + 0 SET x 8:00am + 0 SET x 9:00AM + 0 SET x 10:00am + 0 SET x 11:00AM + 0 SET x 12:00am + 0 SET x 13:00AM + 0 SET x 0:00pm + 0 SET x 1:00PM + 0 SET x 2:00pm + 0 SET x 3:00PM + 0 SET x 4:00pm + 0 SET x 5:00PM + 0 SET x 6:00pm + 0 SET x 7:00PM + 0 SET x 8:00pm + 0 SET x 9:00PM + 0 SET x 10:00pm + 0 SET x 11:00PM + 0 SET x 12:00pm + 0 SET x 13:00PM + 0 SET x '2015-02-03@0:00am' + 0 SET x '2015-02-03@1:00AM' + 0 SET x '2015-02-03@2:00am' + 0 SET x '2015-02-03@3:00AM' + 0 SET x '2015-02-03@4:00am' + 0 SET x '2015-02-03@5:00AM' + 0 SET x '2015-02-03@6:00am' + 0 SET x '2015-02-03@7:00AM' + 0 SET x '2015-02-03@8:00am' + 0 SET x '2015-02-03@9:00AM' + 0 SET x '2015-02-03@10:00am' + 0 SET x '2015-02-03@11:00AM' + 0 SET x '2015-02-03@12:00am' + 0 SET x '2015-02-03@13:00AM' + 0 SET x '2015-02-03@0:00pm' + 0 SET x '2015-02-03@1:00PM' + 0 SET x '2015-02-03@2:00pm' + 0 SET x '2015-02-03@3:00PM' + 0 SET x '2015-02-03@4:00pm' + 0 SET x '2015-02-03@5:00PM' + 0 SET x '2015-02-03@6:00pm' + 0 SET x '2015-02-03@7:00PM' + 0 SET x '2015-02-03@8:00pm' + 0 SET x '2015-02-03@9:00PM' + 0 SET x '2015-02-03@10:00pm' + 0 SET x '2015-02-03@11:00PM' + 0 SET x '2015-02-03@12:00pm' + 0 SET x '2015-02-03@13:00PM' + 0 # Test the ampm function set x ampm(0:12) + "" set x ampm(1:12) + "" set x ampm(2:12) + "" set x ampm(3:12) + "" set x ampm(4:12) + "" set x ampm(5:12) + "" set x ampm(6:12) + "" set x ampm(7:12) + "" set x ampm(8:12) + "" set x ampm(9:12) + "" set x ampm(10:12) + "" set x ampm(11:12) + "" set x ampm(12:12) + "" set x ampm(13:12) + "" set x ampm(14:12) + "" set x ampm(15:12) + "" set x ampm(16:12) + "" set x ampm(17:12) + "" set x ampm(18:12) + "" set x ampm(19:12) + "" set x ampm(20:12) + "" set x ampm(21:12) + "" set x ampm(22:12) + "" set x ampm(23:12) + "" # Coerce with am/pm set x coerce("TIME", "12:45am") set x coerce("TIME", "12:45") set x coerce("TIME", "1:45pm") set x coerce("DATETIME", "2020-05-05@12:45am") set x coerce("DATETIME", "2020-05-05@12:45") set x coerce("DATETIME", "2020-05-05@1:45pm") # Overflow - these tests only work on machines with 32-bit # twos-complement signed integers. You may get test failures on # machines with different architectures. set a $IntMin - 1 set a $IntMin - $IntMax set a $IntMax - $IntMin set a $IntMax - (-1) set a $IntMax + 1 set a $IntMax + $IntMax set a $IntMin + (-1) set a $IntMin + $IntMin set a $IntMax * 2 set a $IntMax * $IntMax set a $IntMax * $IntMin set a $IntMin * 2 set a $IntMin * $IntMin set a $IntMin * $IntMax set a $IntMin / (-1) set a $IntMin * (-1) set a (-1) * $IntMin set a abs($IntMin) # The "isany" function set a isany(1) set a isany("foo") set a isany(1:00) set a isany(1, 2) set a isany("foo", 2) set a isany(1:00, 2) set a isany(1, 2, 1, 3) set a isany("foo", 2, 3, "foo") set a isany(1:00, 2, "foo", 2:00, 1:00, 9:00) # Shellescape set a shellescape(" !\"#$%%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~") msg [a] # Deprecated functions set x psshade(50) set x psmoon(0) # Recursive expression evaluation FSET _f(x) 0 SET tmp evaltrig("Wed SKIP OMITFUNC _f",date(1992,1,8)) REM MSG [tmp] # Trig IF trig("sun +1") || trig("thu +1") REM [trig()] +1 MSG Foo %b ENDIF # Trig with a bad warnfunc FSET w(x) x/0 IF trig("sun warn w") || trig("thu warn w") REM [trig()] +1 MSG Foo %b ENDIF # Trig with a good warnfunc FSET w(x) choose(x, 5, 3, 1, 0) # Ugh. This is where short-circuit logical operators # would really come in handy. IF trig("sun warn w") || trig("thu warn w") REM [trig()] +5 MSG Foo %b ENDIF REM [trig("Mon", "Tue", "Wed", "Sat")] MSG foo REM [trig("Mon", "Tue", "Wed")] MSG bar # The new syntactic sugar REM First Monday January MSG x REM Second Tuesday in April MSG x REM Third Wednesday in October MSG x REM Fourth Friday in July MSG x REM Last Tuesday in August MSG x REM Last Sunday in December MSG x REM First Monday January 2000 MSG x REM Second Tuesday in April 2000 MSG x REM Third Wednesday in October 2000 MSG x REM Fourth Friday in July 2000 MSG x REM Last Tuesday in August 2000 MSG x REM Last Sunday in December 2000 MSG x REM January ~~1 MSG y REM February ~~1 MSG y REM February ~~2 MSG y REM February ~~3 MSG y REM February ~~8 MSG y REM February ~~20 MSG y PUSH OMIT 31 March REM March ~1 MSG y REM March ~~1 MSG y REM Lastday March MSG y REM Lastworkday March MSG y POP REM Dec 2000 ~~1 MSG y REM Dec 2000 ~~2 MSG y REM Dec 2000 ~~3 MSG y REM Dec 2000 ~~7 MSG y REM Jan 2001 ~~1 MSG y REM Lastday April 2022 OMIT SAT SUN MSG foo REM Lastworkday April 2022 OMIT SAT SUN MSG foo SET a pad(1, "0", 2) set a pad(1, "0", 2, 1) set a pad("foo", "quux", 14) set a pad("foo", "quux", 14, 1) set a pad(11:33, " ", 12) set a pad(11:33, " ", 12, 1) set a pad("foo", "0", $MaxStringLen+1) # Test OMIT CLEAR-OMIT-CONTEXT OMIT Apr OMIT Jun THROUGH July 15 OMIT Sep 5 THROUGH Sep 10 OMIT 2024-12-25 THROUGH 2025-01-04 OMIT Apr 2022 through July OMIT DUMP CLEAR-OMIT-CONTEXT OMIT 2000-01-01 THROUGH 2020-12-31 OMIT Dec 5 2029 through Dec 4 2029 # Don't want Remind to queue reminders EXIT __EOF__ REM This line should not even be seen And you can put whatever you like here. [+f=asdfasdasde3ir0a]