[Remind-Fans] user functions
hymie at lactose.homelinux.net
hymie at lactose.homelinux.net
Thu Jan 5 11:36:20 EST 2017
Dianne Skoll writes:
>On Thu, 05 Jan 2017 10:14:10 -0500
>hymie at lactose.homelinux.net wrote:
>
>> Can a user-defined function return and process a full REM command?
>
>No, unfortunately.
That's what I was afraid of. Oh well.
> But wouldn't it be easier to just do:
>
>REM 2017-01-11 *7 SKIP SATISFY [lesson_num('2017-01-11') <= 8] MSG E Coast / N
>ight Club
>
>You don't really need all those variable assignments. Also, it's more
>efficient to precompute the last date and use an UNTIL clause rather than
>SATISFY.
The short answer is that my real situation is more complex than that :)
but yes, I can improve things. And that's part of what I'm doing.
The variables were mostly just to make it modular -- change the start date
in one place and have it update in three automatically, things like that.
(The intent, of course, is that the computer do the work instead of me.)
The end date isn't necessarily known up front -- for example, if they close
due to snow, then we skip a week, but still have 8 classes. You're right
(of course) that I probably want both SATISFY and UNTIL, though.
Now that you mention it, I wonder if I can use the choose() function
to just pre-populate a year-long class list, and have remind automatically
notice "lesson_num just passed 8, so go to the next class". Ooooooooooo...
Thanks for the tips and the ideas.
--hymie! http://lactose.homelinux.net/~hymie hymie at lactose.homelinux.net
More information about the Remind-fans
mailing list