### Author Topic: First impression  (Read 2914 times)

#### Roland Chastain

• Guest
##### First impression
« on: March 03, 2014, 11:49:13 AM »
Hello gentlemen !

I have just discovered EGSL, and I would like to congratulate the author. I tested it under Windows 8. The IDE is simple, clean and easy to use. The examples are nice (I mean the code and also the result).

The only correction I would wish to see in a future release, is that the IDE would remember the last directory opened. (I saw that another user already complained about that.)

Here is a Lua script of mine, quickly adapted to EGSL.

Code: [Select]
--------------------------------------------------------------------------------
-- Nom du fichier : oudin.lua
-- Date de PĂ˘ques par l'algorithme d'Oudin
-- Roland Chastain 26/02/2014
--------------------------------------------------------------------------------

function div(a, b)
return math.floor(a / b)
end

Y = os.date("*t").year

G = Y % 19
C = div(Y, 100)
C4 = div(C, 4)
E = div(8 * C + 13, 25)
H = (19 * G + C - C4 - E + 15) % 30
K = div(H, 28)
P = div(29, H + 1)
Q = div(21 - G, 11)
I = (K * P * Q - 1) * K + H
B = Y + div(Y, 4)
J1 = B + I + 2 + C4 - C
J2 = J1 - 7 * div(J1, 7)
R = 28 + I - J2

--[[
if R < 32 then
D = R
M = "mars"
else
D = R - 31
if D == 1 then
D = "1er"
end
M = "avril"
end

print("En " .. Y .. ", le dimanche de P" .. string.char(131) .. "ques est le "
.. D .. " " .. M .. ".")
]]

-- EGSL

if R < 32 then
D = R
M = 3
else
D = R - 31
M = 4
end

screen(320, 200, 0, "Date of Easter")
backcolour (0, 0, 0)
cls()

colour(255, 255, 255)
monotext(0, 0, "Current year : "..Y)
monotext(0, 15, "Date of Easter : "..os.date("%m/%d", os.time{year=Y, month=M, day=D}))
sync()

inkey()
closewindow()

P.-S. The games (Astrorocks, Brickmaster and Wallman) are really beautiful.
« Last Edit: March 03, 2014, 04:42:17 PM by Roland Chastain »