[09 Jul 2008] Hollywood and LUA syntax?

Contains all messages from the Hollywood mailing list between 01/2006 and 08/2012
Locked
User avatar
TheMartian
Posts: 109
Joined: Sun Feb 28, 2010 12:51 pm

[09 Jul 2008] Hollywood and LUA syntax?

Post by TheMartian »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Wed, 09 Jul 2008 20:04:35 -0000

Hi

Some time ago it dawned on me that LUA seems to be a cornerstone of Hollywoods script language. As I had no previous knowledge about LUA this has been a source of much fun and experiments coming to grips with the LUA language and exploiting it inside the framework of Hollywood (or is it the other way round!?)

Anyway. Here is a question for you Andreas... Can I expect to use LUA syntax without restrictions or have you made some changes that modifies behaviour. Two things I am wondering about is the use of '(' and ')' in some cases, as well as indexes starting at 0 or 1 in tables/lists.

I am using the new knowledge to rewrite the GUI kit parts, I published in a dare I say unfinished state some time ago, into more compact code. The aim is also to structure it, so new user controls can be made more or less by copy and paste from other controls supplemented by a unique draw routine and some code to handle any unique functionality.

I start my summer holiday in a few weeks time and hope to be ready with another version at its end. The code will go to the same folder as before. (itemlist)

Have a nice summer holiday everyone.

Jesper
User avatar
airsoftsoftwair
Posts: 5834
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

[10 Jul 2008] Re: Hollywood and LUA syntax?

Post by airsoftsoftwair »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 10 Jul 2008 22:34:37 +0200
Hi

Some time ago it dawned on me that LUA seems to be a cornerstone of Hollywoods script language. As I had no previous knowledge about LUA this has been a source of much fun and experiments coming to grips with the LUA language and exploiting it inside the framework of Hollywood (or is it the other way round!?)

Anyway. Here is a question for you Andreas... Can I expect to use LUA syntax without restrictions or have you made some changes that modifies behaviour. Two things I am wondering about is the use of '(' and ')' in some cases, as well as indexes starting at 0 or 1 in tables/lists.
There are several syntax differences. This was necessary because when I wanted to keep compatibility with the old Hollywood versions. Remember that Hollywood 1.x was NOT based on Lua. The virtual machine inside Hollywood was switched to Lua with Hollywood 2.0.

Some things that I changed:

- Lua is case sensitive; Hollywood is not
- Lua uses 1 as the index base, Hollywood uses 0
- Hollywood requires parentheses around Return()
- Hollywood uses clearly named end of scope delimiters like Wend, Next, EndIf, EndFunction, Until, EndBlock etc. ; Lua just uses "End" for all of them
- Lua requires "Then" after "If"; in Hollywood "Then" signals a short If-statement

And there's more. Additionally, I implemented some stuff into the virtual machine that Lua does not have at all. New operators, Switch-EndSwitch support, short statements, constants, hexadecimal support etc etc.
User avatar
TheMartian
Posts: 109
Joined: Sun Feb 28, 2010 12:51 pm

[11 Jul 2008] Re: Hollywood and LUA syntax?

Post by TheMartian »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Fri, 11 Jul 2008 14:01:49 +0000 (GMT)

Thanks I think I'll go by the time honoured method of trying whatever it is and see if it works :-)

regards Jesper
Locked