|
-
Sep 3rd, 2005, 05:28 PM
#1
Thread Starter
Hyperactive Member
E+ Syntax and Revisions (0.1.4)
Here I will post the needed syntax for any people who wish to write simple applications using E+!
I will keep you up to date with all that happens, below you will find the latest syntax, from the Thread start!
Be warned that the posts may get longer and i may just attach the text file with the syntax soon 
Revision 3 has small syntax changes according to text and flow strings!
Revision 4 has major syntax changes and additions, including error handling, full explanation of flow functions and object creation (Not Complete)
Last edited by ..:RUDI:..; Sep 4th, 2005 at 07:01 AM.
-
Sep 3rd, 2005, 05:29 PM
#2
Thread Starter
Hyperactive Member
Re: E+ Syntax and Revisions (0.1.2)
E+ Simple 0.1 Framework code (Revision 2):
Simple extentions to all below:
The main extensions that you will need to know are probably "and" and "then", the most common being "then" or both together, examples below:
Wait() then
Exit() <--- Waits for the user to press Enter and the program exits
Wait() and
PrintText(Press Enter to exit) then
Exit() <--- Same as above but prints text not destroyin the Wait function's usage
Creating your environment:
Your users will of course need something to look at before even using your application! And of course it's needed to even use your application! If you do not
include the following variables, the designer will include the defaults!
Create the initial window - CreateWindow(x*y) <--- 800*600 only supported in version 0.1
Change the Background Colour - BackCol(col) <--- Uses only simple colours, blue, grey (system), red
*TIP* A good start is to not define any variables at first, and the default will be used (800*600, Grey)
Writing some text:
Producing text is good to welcome people to your application, tell them what it does, what features it has and the program version, of course it is probably
the core of your users needs, as images are not yet supported in this language, your application will probably use text to communicate with the user
permanantly!
Write standard text (Arial, 8pt), unless previously defined - PrintText(TEXT)
Change the text's colour - TextCol(col) <--- Uses only simple colours, blue, black, red
Change the text's font - TextFont(Font) <--- Uses only system fonts (Only Arial and MS Sans Serif supported for now)
Put to default text parameters - TextDef()
Halting Statements:
At some points you may want to halt your program for an event, or wait for the user to do something.
Wait for the User to press enter - Wait()
Wait for the user to press a defined key - wait(KEY)
Pause the program for a few seconds (10 max.) - Pause(1-10)
Termination:
At some point you will want to terminate the program!
Terminate the program - Exit()
Unload the program from memory - UnloadAll.True <--- Also used in E++
*TIP* For best results it is always best to unload the program from the memory! This secures that the user doesnät have multiple copies of this program open!
*TIP* To use unload and Exit together you should use the E++ if then statement, working example below:
Exit() and
If(Exit.Succeed=1) then
UnloadAll.False
Else
UnloadAll.True
endif
*TIP* Unloading the program is a must when using E+ plugins...
-
Sep 4th, 2005, 06:15 AM
#3
Thread Starter
Hyperactive Member
Re: E+ Syntax and Revisions (0.1.2)
Mage Software E+ Simple 0.1 Framework code (Revision 3):
Simple extentions to all below:
The main extensions that you will need to know are probably "and" and "then", the most common being "then" or both together, examples below:
Wait() then
Exit() <--- Waits for the user to press Enter and the program exits
Wait() and
PrintText(Press Enter to exit) then
Exit() <--- Same as above but prints text not destroyin the Wait function's usage
Creating your environment:
Your users will of course need something to look at before even using your application! And of course it's needed to even use your application! If you do not
include the following variables, the designer will include the defaults!
Create the initial window - CreateWindow(x*y) <--- 800*600 only supported in version 0.1
Change the Background Colour - BackCol(col) <--- Uses only simple colours, blue, grey (system), red
*TIP* A good start is to not define any variables at first, and the default will be used (800*600, Grey)
Writing some text:
Producing text is good to welcome people to your application, tell them what it does, what features it has and the program version, of course it is probably
the core of your users needs, as images are not yet supported in this language, your application will probably use text to communicate with the user
permanantly!
Write standard text (Arial, 8pt), unless previously defined - PrintText(TEXT)
Change the text's colour - TextCol(col) <--- Uses only simple colours, blue, black, red
Change the text's font - TextFont(Font) <--- Uses only system fonts (Only Arial and MS Sans Serif supported for now)
Change the text's size - TextSize(size)
Put to default text parameters - TextDef()
Halting Statements:
At some points you may want to halt your program for an event, or wait for the user to do something.
Wait for the User to press enter - Wait()
Wait for the user to press a defined key - wait(KEY)
Pause the program for a few seconds (10 max.) - Pause(1-10)
Termination:
At some point you will want to terminate the program!
Terminate the program - Exit()
Unload the program from memory - UnloadAll.True <--- Also used in E++
*TIP* For best results it is always best to unload the program from the memory! This secures that the user doesnät have multiple copies of this program open!
*TIP* To use unload and Exit together you should use the E++ if then statement, working example below:
Exit() and
If(Exit.Succeed=1) then
UnloadAll.False
Else
UnloadAll.True
endif
*TIP* Unloading the program is a must when using E+ plugins...
-
Sep 4th, 2005, 07:00 AM
#4
Thread Starter
Hyperactive Member
Re: E+ Syntax and Revisions (0.1.3)
Mage Software E+ Simple 0.1 Framework code (Revision 4):
Simple extentions to all below:
The main extensions that you will need to know are probably "and" and "then", the most common being "then" or both together, examples below:
Wait() then
Exit() <--- Waits for the user to press Enter and the program exits
Wait() and
PrintText(Press Enter to exit) then
Exit() <--- Same as above but prints text not destroying the Wait function's usage
Creating your environment:
Your users will of course need something to look at before even using your application! And of course it's needed to even use your application! If you do not
include the following variables, the designer will include the defaults!
Create the initial window - CreateWindow(x*y) <--- 800*600 only supported in version 0.1
Change the Background Colour - BackCol(col) <--- Uses only simple colours, blue, grey (system), red
*TIP* A good start is to not define any variables at first, and the default will be used (800*600, Grey)
Writing some text:
Producing text is good to welcome people to your application, tell them what it does, what features it has and the program version, of course it is probably
the core of your users needs, as images are not yet supported in this language, your application will probably use text to communicate with the user
permanantly!
Write standard text (Arial, 8pt), unless previously defined - PrintText(TEXT)
Change the text's colour - TextCol(col) <--- Uses only simple colours, blue, black, red
Change the text's font - TextFont(Font) <--- Uses only system fonts (Only Arial and MS Sans Serif supported for now)
Change the text's size - TextSize(size)
Put to default text parameters - TextDef()
Halting Statements:
At some points you may want to halt your program for an event, or wait for the user to do something.
Wait for the User to press enter - Wait()
Wait for the user to press a defined key - wait(KEY)
Pause the program for a few seconds (10 max.) - Pause(1-10)
Halt the code proccessing - halt()
Termination:
At some point you will want to terminate the program!
Terminate the program - Exit()
Unload the program from memory - UnloadAll.True <--- Also used in E++
*TIP* For best results it is always best to unload the program from the memory! This secures that the user doesnät have multiple copies of this program open!
*TIP* To use unload and Exit together you should use the E++ if then statement, working example below:
Exit() and
If(Exit.Succeed=1) then
UnloadAll.False
Else
UnloadAll.True
endif
*TIP* Unloading the program is a must when using E+ plugins...
Simple Object Creation:
You will probably have to create some objects in your application, the E+ Development Engine will automatically appropriately place the objects according to
text and space!
Define the following before any other code in your application if objects are to be used - ActivateObjects.True and
ObjectCreation.True
Create a user TextInput Box (30 Characters only at the moment) - CreateObject() define TextInput and
DefineStyle.LineBox <--- Also used in E++
Flow Variables:
Two of these are outlined at the top of the syntax but more are now in use.
To keep the code running if it needs a variable defining in a new line - and
To wait for the function to finish before proceeding (Can save Memory Usage and speed up function processing) - then
Repeat the process, mostly this should only be used if your code doesn't continue and needs to repeat constantly - LoopCode.True
Repeat a certain line of code - Repeat(lineno.).True
Repear a certain line of code more than once, add this code to the above line - and
define loopprevious(times) <--- To loop constantly without affecting any other code processing, define loopprevious(inf.), inf. stands for infinate.
Repeat more than one line - Repeat(no1,no2,no3).True <--- You can change the line numbers ie. Repeat(1,2,3).True to previous lines ie. Repeat(pr3,pr2,pr1)
must be done in reverse order to run in correct order! See Error Handling code below)
Halt the code processing after and error (Uses E++ If...Then) - CreateErrorHandler.True
if(ErrorHandler returns *.True) then
halt()
else
endif
Repeat(pr4,pr3,pr2,pr1).True and
define loopprevious(inf.)
-
Sep 4th, 2005, 11:05 PM
#5
Frenzied Member
Re: E+ Syntax and Revisions (0.1.4)
why don't you just edit your original post each time?
what is E+?
-
Sep 5th, 2005, 03:37 AM
#6
Thread Starter
Hyperactive Member
Re: E+ Syntax and Revisions (0.1.4)
E+ is a new programming language for absolute beginners and good idea
-
Sep 5th, 2005, 03:44 AM
#7
Frenzied Member
Re: E+ Syntax and Revisions (0.1.4)
Cool...did not knw....where do one get it and help, etc?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|