[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Re: NB...BB blocks that did break and shouldn't
- Subject: Re: NB...BB blocks that did break and shouldn't
- From: Carl Distefano CLDistefano@xxxxxxxx
- Date: Sun, 30 Mar 1997 12:28:36 EST
** Reply to note from TBaehr@xxxxxxxx Sun, 30 Mar 97 10:03:17 +0000
-> Re programs that execute within programs: This could be added
-> to the Print command in a U2 file; much experimentation and
-> debugging would be needed.....
Tim: Just about anything can be kludged with XPL, as you well know.
What I had in mind was a native facility, integral to EDITOR.EXE.
Something that wouldn't require "much experimentation and debugging",
and would execute transparently at print time. I haven't even begun to
think about how it might work in practice. The notion of "smart
formatting" encompasses so many possiblities, the mind boggles.
On an unrelated, seasonal note, here's an XPL implementation of Oudin's
algorithm for calculating the date of Easter in the Gregorian calendar.
The comments show the formula in algebraic notation; "/" means integer
division; discard remainders. Happy holidays to all.
P.S. Change [] to real guillemets and {2} to Ascii-2's. Delete
extraneous newlines (CrLf's).
[GLa] EASTER.PM [CLD]
{{5Help4Easter}} Help for EASTER.PM
{2}[SV01,[FL][LM1DI][RM79DI][SZ12PT,12PT][UFSTANDARD]
EASTER.PM -- C.L.Distefano 1/3/97
XyWrite 4|XyWrite for Windows
Calculate date of Easter Sunday for any Gregorian year
Usage:
Disk PM : RUN EASTER.PM yyyy
U2 frame: EASTER yyyy
[FC]
For Use with RENUMBER.PM:
Default Save/Get Range = [00|50] 01-09
Renumber in PACK mode, FREEZE 50
[FL][LM]]{2}
{{m}}
{{5,Easter}} Calculate date for Easter in any Gregorian year
{2}[SX00,[IS50]][LBa][SX01,[IS00]][IF[VA|01]<1![VA01]<1][SX01,[VA$DAyy
y]][EI][IF[PV01]<1583][PRYear must be after 1582][EX][EI];*; 01=Y
[SX02,@int([PV01]/100)];*; 02=C | C = Y/100
[SX03,[PV01]-19*@int([PV01]/19)];*; 03=N | N = Y - 19*(Y/19)
[SX04,@int(([PV02]-17)/25)];*; 04=K | K = (C - 17)/25
[SX05,[PV02]-@int([PV02]/4)-@int(([PV02]-[PV04])/3)+19*[PV03]+15];*;
05=I | I = C - C/4 - (C - K)/3 + 19*N + 15
[SX05,[PV05]-30*@int([PV05]/30)];*; I = I - 30*(I/30)
[SX05,[PV05]-@int([PV05]/28)*(1-@int([PV05]/28))*
*@int(29/([PV05]+1)*@int((21-[PV03])/11)];*; I =
I - (I/28)*(1 - (I/28)*(29/(I + 1))*((21 - N)/11))
[SX06,[PV01]+@int([PV01]/4)+[PV05]+2-[PV02]+@int([PV02]/4)];*; 06=J | J
= Y + Y/4 + I + 2 - C + C/4
[SX06,[PV06]-7*@int([PV06]/7)];*; J = J - 7*(J/7)
[SX07,[PV05]-[PV06]];*; 07=L L = I - J
[SX08,3+@int(([PV07]+40)/44)];*; 08=M | M = 3 + (L + 40)/44
[SX09,[PV07]+28-31*@int([PV08]/4)];*; 09=D | D = L + 28 - 31*(M/4)
[SX01,[IS08]+"/"+[IS09]+"/"+[IS01]][PR@01][EX]{2}
--------------
Carl Distefano * * *