[Gambas-user] How to compute Eastern Day

2014-12-19 Thread Benoît Minisini
Hi, Here is a little X-Mas gift, a function to compute Eastern Day: ---8 Public Sub Eastern(Year As Integer) As Date Dim A, B, C, D, E, F, G As Integer A = Year Mod 19 + 1 B = Year Div 100 + 1 C = (3 * B) Div 4 -

Re: [Gambas-user] How to compute Eastern Day

2014-12-19 Thread T Lee Davidson
When I execute that, I get Syntax error. The first argument is not a valid identifier on line Public Sub Eastern(Year As Integer) As Date. Year is a function. And did you mean Easter Day? Lee __ Artificial Intelligence is no match for natural stupidity. On 12/19/2014 08:35 AM,

Re: [Gambas-user] How to compute Eastern Day

2014-12-19 Thread Fabien Bodard
replace by 'iYear as integer' Public Sub Eastern(iYear As Integer) As Date 2014-12-19 16:57 GMT+01:00 T Lee Davidson t.lee.david...@gmail.com: When I execute that, I get Syntax error. The first argument is not a valid identifier on line Public Sub Eastern(Year As Integer) As Date. Year is a

Re: [Gambas-user] How to compute Eastern Day

2014-12-19 Thread Fabien Bodard
Public Sub Eastern(iYear As Integer) As Date Dim A, B, C, D, E, F, G As Integer A = iYear Mod 19 + 1 B = iYear Div 100 + 1 C = (3 * B) Div 4 - 12 D = (8 * B + 5) Div 25 - 5 E = (iYear * 5) Div 4 - 10 - C F = ((11 * A + 20 + D - C) Mod 30 + 30) Mod 30 If F = 24 Or (F = 25

Re: [Gambas-user] How to compute Eastern Day

2014-12-19 Thread Tobias Boege
On Fri, 19 Dec 2014, T Lee Davidson wrote: On 12/19/2014 08:35 AM, Beno??t Minisini wrote: Hi, Here is a little X-Mas gift, a function to compute Eastern Day: ---8 Public Sub Eastern(Year As Integer) As Date

Re: [Gambas-user] How to compute Eastern Day

2014-12-19 Thread Benoît Minisini
Le 19/12/2014 16:57, T Lee Davidson a écrit : When I execute that, I get Syntax error. The first argument is not a valid identifier on line Public Sub Eastern(Year As Integer) As Date. Year is a function. And did you mean Easter Day? Yes. But why do you get a syntax error, and not me

Re: [Gambas-user] How to compute Eastern Day

2014-12-19 Thread T Lee Davidson
On 12/19/2014 11:47 AM, Tobias Boege wrote: On Fri, 19 Dec 2014, T Lee Davidson wrote: On 12/19/2014 08:35 AM, Beno??t Minisini wrote: Hi, Here is a little X-Mas gift, a function to compute Eastern Day: ---8 Public Sub

Re: [Gambas-user] How to compute Eastern Day

2014-12-19 Thread Gian
Il 19/12/2014 20:48, Benoît Minisini ha scritto: Le 19/12/2014 16:57, T Lee Davidson a écrit : When I execute that, I get Syntax error. The first argument is not a valid identifier on line Public Sub Eastern(Year As Integer) As Date. Year is a function. And did you mean Easter Day?

Re: [Gambas-user] How to compute Eastern Day

2014-12-19 Thread T Lee Davidson
On 12/19/2014 02:48 PM, Benoît Minisini wrote: Le 19/12/2014 16:57, T Lee Davidson a écrit : When I execute that, I get Syntax error. The first argument is not a valid identifier on line Public Sub Eastern(Year As Integer) As Date. Year is a function. And did you mean Easter Day? Yes.

Re: [Gambas-user] How to compute Eastern Day

2014-12-19 Thread Benoît Minisini
Le 19/12/2014 20:57, T Lee Davidson a écrit : On 12/19/2014 02:48 PM, Benoît Minisini wrote: Le 19/12/2014 16:57, T Lee Davidson a écrit : When I execute that, I get Syntax error. The first argument is not a valid identifier on line Public Sub Eastern(Year As Integer) As Date. Year is a