Quasar
Moderator

Posts: 2177
Registered: 08-00 |
While I've been without a home internet connection for almost a week now, I've been working on EE a *lot*. I've been knocking out some long-scheduled improvements to EDF.
1. HEREDOC syntax: Anywhere you can put a string, you can now also put a heredoc. What is a "heredoc?" It's a document provided inline with surrounding code. It could for example be code in another language, or just plain text data. EDF uses Windows Power Console's heredoc syntax, opening them with a @" and closing them with a "@ at the end of a line.
An example (totally an example, this is not a real scripting language...) might look like this:
code:
frame foo
{
action = @" for(i = 0; i < 3; ++i) CallSomeScriptFunc(); "@
}
2. Keywords for action function parameters. That's right, no more remembering stupid numbers when you want to set arguments on frames. Now you can use values such as "monster" or "add" or "nomomentum".
3. Action function parameter syntax improvement in cmp frames. Example:
code:
frame foo
{
cmp = "TROO | A | * | 5 | SetTics(105, 128) | @next"
}
Works together with the new keyword system.
4. Function-valued variables. I am modifying libConfuse to allow function values for options. Example:
code:
frame foo
{
action = SetTics(105, 128)
}
EDIT: I forgot one!
5. Cascading namespace resolution for values in frame args/misc fields. If a name is not explicitly qualified, it will no longer simply be interpreted as an integer. It will first be looked for in the following namespaces in the given order:
thingtypes, frames, sounds, strings, bex pointers, keywords
I have the ability to add further namespaces to this sequence if they are needed in the future. As I mentioned, you can still explicitly qualify a name, for example if there are conflicts (a frame and thing named the same thing and you want the frame, for example). To do that, you just do what you always did - thing:foo or frame:foo, etc.
So, pretty snazzy stuff, huh?
Last edited by Quasar on 04-03-08 at 21:04
|