Jose Morales
2022-10-30 11:33:45 UTC
Sorry all, it looks like I'm having an issue I can't seem to understand my problem.
Here is what I'm trying to accomplish... it seems to work when I'm interactive, with the exception if the condition. I have some concerns on the AND condition as that might be the problem... but it fails on the last part off the definition.
\ Next we calculate an uncorrected date for the Paschal full moon, p'; then we apply a
\ minor correction to get the exact date, p, as the number of days after 21st March.
\ p' = (3 - 11g + s - l) mod 30
\ if (p' == 29) or (p' == 28 and g > 11) then
\ p = p' - 1
\ else
\ p = p'
Here is my word that fails to compile...
: _PascalCorr ( -- -- ) compiled
3 11 G @ * - S @ L @ - + 30 MOD P' ! compiled
P' @ DUP 29 = IF P ! ELSE DROP compiled
P' @ DUP 28 = AND G @ 11 > IF 1 - P ! ELSE DROP THEN compiled
P' @ P ! ;
:163: unstructured
P' @ P ! >>>;<<<
Backtrace:
$7F185F1E8988 throw
$7F185F1F84E0 c(abort")
$7F185F2055E0 def?
$7F185F1F18C0 ;-hook
Any pointers into this issue would shed some light as I seem to be missing something.
Cheers!
Here is what I'm trying to accomplish... it seems to work when I'm interactive, with the exception if the condition. I have some concerns on the AND condition as that might be the problem... but it fails on the last part off the definition.
\ Next we calculate an uncorrected date for the Paschal full moon, p'; then we apply a
\ minor correction to get the exact date, p, as the number of days after 21st March.
\ p' = (3 - 11g + s - l) mod 30
\ if (p' == 29) or (p' == 28 and g > 11) then
\ p = p' - 1
\ else
\ p = p'
Here is my word that fails to compile...
: _PascalCorr ( -- -- ) compiled
3 11 G @ * - S @ L @ - + 30 MOD P' ! compiled
P' @ DUP 29 = IF P ! ELSE DROP compiled
P' @ DUP 28 = AND G @ 11 > IF 1 - P ! ELSE DROP THEN compiled
P' @ P ! ;
:163: unstructured
P' @ P ! >>>;<<<
Backtrace:
$7F185F1E8988 throw
$7F185F1F84E0 c(abort")
$7F185F2055E0 def?
$7F185F1F18C0 ;-hook
Any pointers into this issue would shed some light as I seem to be missing something.
Cheers!