RetroBASIC

Offtopic => Offtopic => Topic started by: Tomaaz on May 23, 2013, 09:12:25 AM

Title: EGSL Samples on bp.org
Post by: Tomaaz on May 23, 2013, 09:12:25 AM
Rick3137 have started an interesting topic (http://forum.basicprogramming.org/index.php/topic,2902.0.html) that should have been started here as well. Could anyone suggest it to the author (I'm banned there). Thanx!
Title: Re: EGSL Samples on bp.org
Post by: Rick3137 on June 20, 2013, 01:08:54 PM
 Hey Tomaaz;
     There are so many programming languages on Internet now, that I can't resist the idea of writing one program over and over and putting it everywhere. Lets see Google try and stop me.  They think they own the Internet.
Title: Re: EGSL Samples on bp.org
Post by: Bereb on September 14, 2013, 09:34:12 PM
Very interesting  :)

May I point something out. In your samples, I saw you created functions for radian and degree conversions.
Do you know those functions already exist in Lua, so in EGSL too ? math.rad and math.deg (see here (http://www.lua.org/manual/5.1/manual.html#5.6))
You may declare them in this way, for instance :

Code: [Select]
local rad, deg = math.rad, math.deg
Using local variables or functions allows you to gain some speed in your scripts (see  here (http://lua-users.org/wiki/OptimisingUsingLocalVariables))

Unless you would rather write your programs in "pure EGSL"  ;)

Regards