red-code, and I don't do PRs, so please...
usein a unique way to create contexts, which is very non-standard, and we don't have
usein Red. It's inclusion is TBD.
thruop. It occurred to me that this can be used in the idiom
foreach i 1 thru 15 [...]to emulate a
forloop. And with an additional operator
make op! func [a b][extract a b]one can have
foreach i 1 thru 15 step 2 [...]. This is of course not space- and time-efficient, but for rapid prototyping it could be enough. Because of issue #3344 one cannot use words instead of numbers, but that may come.
step: make op! func [a [series!] b [integer!]][ case [ b = 0 [a] b < 0 [reverse extract (last a) thru (first a) 0 - b] 'else [extract a b] ]] >> foreach a 3 thru 10 step 2 [print a] 3 5 7 9 >> foreach a 3 thru 10 step -2 [print a] 4 6 8 10 >> foreach a 10 thru 3 step 2 [print a] 10 8 6 4 >> foreach a 10 thru 3 step -2 [print a] 9 7 5 3
request-datewhich, when called, brings up a small month calendar with options to skip to next/previous month and next/previous year. Clicking a date yields the
date!value as result. Call it with a
date!argument to prefill a certain date, or with
noneto prefill it with today's date. The code is here
set 'last-day-of-month func [date /local d] [ d: date d/day: 1 d/month: d/month + 1 d: d - 1 d ]
/yearcomponent of 29-Feb-2020 gives a non-existing date. See the latest issue #3881 .
You limit the years...
Years are limited in drop-down selection list, but any year can be entered in the box. No sense in providing list of all years for selection.
you avoid the above problem by losing focus ...
Yes, because that's the job of user to pick a date. But currently my picker doesn't actually return a date, only probes the picked value.
I agree about