1. Euphoria Version 4.0
- Posted by dcole Sep 12, 2010
- 5385 views
I just figured out how to run both Euphoria version 3.1.1 and version 4.0 beta 4 on same computer. Create 2 users( in Windows XP). And set the Environmental Variables accordingly.
Now what I would like to know is:
Is there a list of routines that can run in ver 4.0 that didn't work in ver 3.1.1 ?
Are there any ver 4.0 demos?
I am especially interested in Forward Referencing are there any demos?
Don Cole
2. Re: Euphoria Version 4.0
- Posted by ChrisB (moderator) Sep 12, 2010
- 5436 views
I just figured out how to run both Euphoria version 3.1.1 and version 4.0 beta 4 on same computer. Create 2 users( in Windows XP). And set the Environmental Variables accordingly.
Now what I would like to know is:
Is there a list of routines that can run in ver 4.0 that didn't work in ver 3.1.1 ?
yes, tons http://oe.cowgar.com/docs/eu400_0111.html#_5856_changes
Are there any ver 4.0 demos?
All the demos included with version 3
I am especially interested in Forward Referencing are there any demos?
The key thing here is not to worry to much. You're no longer constrained by having to put a called procedure BEDORE you call it within the program. I still try to, because its habit and discipline, and when I do call one forward, I put a little comment in it to tell me where it is in the future - happens rarely though.
One of the biggest, and most convenient changes, is not having to assign a variable to a function when returning. For instance I have a get_yn_box function, which I used to have to assign to VOID variable on return, but now I can just call the function as if it were a procedure. Almost does away with the requirements for procedures.
Incidentally, you needn't have set up two users, having to switch between users in order to use eu 4. Eu 4 doesn't need environment variables to be set any more (just a path to eui, and as exw/ex are eu 3 programs, there is a different call to start them), look up eu.cfg, which replaces the environment variables http://oe.cowgar.com/docs/eu400_0011.html#_64_eucfg
Chris
3. Re: Euphoria Version 4.0
- Posted by petelomax Sep 12, 2010
- 5388 views
For instance I have a get_yn_box function, which I used to have to assign to VOID variable on return, but now I can just call the function as if it were a procedure.
Which makes me wonder: why are you asking the user to stipulate Yes or No when you're just going to ignore whatever they select?
4. Re: Euphoria Version 4.0
- Posted by irv Sep 12, 2010
- 5393 views
Maybe because there's no get_i_could_care_less_box function? :)
5. Re: Euphoria Version 4.0
- Posted by petelomax Sep 12, 2010
- 5286 views
Maybe because there's no get_i_could_care_less_box function? :)
Well, obviously there should be! (a procedure not a function that is, and show_ok_box might be a better name!)
6. Re: Euphoria Version 4.0
- Posted by ChrisB (moderator) Sep 12, 2010
- 5293 views
For instance I have a get_yn_box function, which I used to have to assign to VOID variable on return, but now I can just call the function as if it were a procedure.
Which makes me wonder: why are you asking the user to stipulate Yes or No when you're just going to ignore whatever they select?
LOL
Because it also became a "Hit any key", and "You can't do that!" message box function
Chris
7. Re: Euphoria Version 4.0
- Posted by useless Sep 12, 2010
- 5344 views
Maybe because there's no get_i_could_care_less_box function? :)
You could care less? So you do care some?
useless
8. Re: Euphoria Version 4.0
- Posted by DerekParnell (admin) Sep 12, 2010
- 5279 views
Maybe because there's no get_i_could_care_less_box function? :)
You could care less? So you do care some?
LOL ... This is another Americanism that has amused me for awhile. They tend to say "I could care less" when they actually mean the opposite "I could not care less".
9. Re: Euphoria Version 4.0
- Posted by mattlewis (admin) Sep 12, 2010
- 5288 views
Maybe because there's no get_i_could_care_less_box function? :)
You could care less? So you do care some?
LOL ... This is another Americanism that has amused me for awhile. They tend to say "I could care less" when they actually mean the opposite "I could not care less".
Some Americans are less than amused by this, I can assure you.
Matt
10. Re: Euphoria Version 4.0
- Posted by dcole Sep 12, 2010
- 5268 views
All the demos included with version 3
Yes, but I would assume that these are ver3 demos.
What I would like to see is demos that work in ver4 but will not work in ver3.
The key thing here is not to worry to much. You're no longer constrained by having to put a called procedure BEDORE you call it within the program. I still try to, because its habit and discipline, and when I do call one forward, I put a little comment in it to tell me where it is in the future - happens rarely though.
Thank you for that.
Incidentally, you needn't have set up two users, having to switch between users in order to use eu 4. Eu 4 doesn't need environment variables to be set any more (just a path to eui, and as exw/ex are eu 3 programs, there is a different call to start them)
So Ver3 must use Environmental Variables.
If running two versions I need 2 EUDIRs:
Ver3 = "E:\euphoria"
Ver4 = "E:\euphoria-40B4"
Each with their own include files.
Also 2 PATHs:
Ver3 = "E:\euphoria\bin"
Ver4 = "E:\euphoria-40B4\bin"
If using only one set of Environmental Variables (remember you must have 1 set for ver3)
Let's say using the extention .exw, how would Euphoria know what to use exw.exe or .eui.exe?
Don Cole
11. Re: Euphoria Version 4.0
- Posted by useless Sep 13, 2010
- 5297 views
Let's say using the extention .exw, how would Euphoria know what to use exw.exe or .eui.exe?
Use a different extension, and tell windose to open that new one with eui.
For setting environmental vars differently for each instance of Eu, i do this eui.bat (you can do exw.bat, as well as rename the exe you chose to something unique for identifying in a task viewer) :
@PATH=%PATH%;C:\euphoria40b4\bin;C:\euphoria40b4\include @SET EUDIR=C:\euphoria40b4 @start /b C:\euphoria40b4\bin\eui.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 @cls
Put in valid vars for your environment, then run the .bat, not the .exe. There's different ways to pull off the same results, Matt provided an example too, in a recent topic. The bat file approach works on previous Eu versions that have no config files.
useless
12. Re: Euphoria Version 4.0
- Posted by ChrisB (moderator) Sep 13, 2010
- 5231 views
Hi
Yes, that's another solution.
Sorry Don, if you want the ease of clicking the .exw program to start euphoria, then you can only choose either eu4 or eu3 (or use your 2 user solution). To run eu4, as Kat says, rename the extension of the program you want to run to .eui, and associate it with eu4. BUT the environment variables will be used by 4, which is why you use a .cfg file, to search for eu4's include path first
If you want the choice of either running eu4 or eu3, then you either have to use the batch solution, or ensure that a eu.cfg file exists in the program_that_you_are_writing's folder. The environment variables are only required for eu3 (yes you must have them), but are optional for eu4 if you have a eu.cfg in the folder.
Alternatively, do as I have done, and dump eu3 entirely. Make's life so much more simpler, and haven't found a program yet I can't tweak up to 4's standard. Part of the fun.
Chris
13. Re: Euphoria Version 4.0
- Posted by irv Sep 13, 2010
- 5113 views
Alternatively, do as I have done, and dump eu3 entirely. Make's life so much more simpler, and haven't found a program yet I can't tweak up to 4's standard. Part of the fun.
This is, of course, the best way to do it. Euphoria 3 isn't going to be developed any further, and there are a LOT of improvements in 4, many of which make a program smaller and easier to understand.
Besides, once you modify an old program to run on 4, you can submit it back to RDS for the rest of us to enjoy! :) (You've probably noticed that the number of contributions there has dropped off severely)
14. Re: Euphoria Version 4.0
- Posted by petelomax Sep 13, 2010
- 5192 views
There is yet another way. Here is a .reg file from Edita:
REGEDIT4 [HKEY_CLASSES_ROOT\.e] @="Eu DOS include" [HKEY_CLASSES_ROOT\EU DOS include\DefaultIcon] @="E:\\Euphoria\\BIN\\Ex.exe,1" [HKEY_CLASSES_ROOT\EU DOS include\shell\open\command] @="E:\\Euphoria\\bin\\exw.exe D:\\Edita\\Edita.exw \"%1\"" [HKEY_CLASSES_ROOT\.ex] @="Eu DOS program" [HKEY_CLASSES_ROOT\EU DOS program\DefaultIcon] @="E:\\Euphoria\\BIN\\Ex.exe,1" [HKEY_CLASSES_ROOT\EU DOS program\shell\open\command] @="E:\\Euphoria\\bin\\ex.exe \"%1\"" [HKEY_CLASSES_ROOT\EU DOS program\shell\edit\command] @="E:\\Euphoria\\bin\\exw.exe D:\\Edita\\Edita.exw \"%1\"" [HKEY_CLASSES_ROOT\.ew] @="Eu Win include" [HKEY_CLASSES_ROOT\EU Win include\DefaultIcon] @="E:\\Euphoria\\BIN\\Exw.exe,1" [HKEY_CLASSES_ROOT\EU Win include\shell\open\command] @="E:\\Euphoria\\bin\\exw.exe D:\\Edita\\Edita.exw \"%1\"" [HKEY_CLASSES_ROOT\.exw] @="Eu Win program" [HKEY_CLASSES_ROOT\EU Win program\DefaultIcon] @="E:\\Euphoria\\BIN\\Exw.exe,1" [HKEY_CLASSES_ROOT\EU Win program\shell\open\command] @="E:\\Euphoria\\bin\\exw.exe \"%1\"" [HKEY_CLASSES_ROOT\EU Win program\shell\edit\command] @="E:\\Euphoria\\bin\\exw.exe D:\\Edita\\Edita.exw \"%1\""and here is another, less scary, one I found lying around:
REGEDIT4 [HKEY_CLASSES_ROOT\.exw] @="EuWinApp" [HKEY_CLASSES_ROOT\EuWinApp] @="Euphoria Windows App" [HKEY_CLASSES_ROOT\EuWinApp\DefaultIcon] @="C:\\Programs\\Euphoria\\Bin\\exw.exe,0" [HKEY_CLASSES_ROOT\EuWinApp\shell\open\command] @="\"C:\\Programs\\Euphoria\\Bin\\exw.exe\" \"%1\""It would not be difficult to create say Eu3.reg and Eu4.reg versions of these which would allow you to right-click on them and select Merge to alter Windows behaviour, nor would it be difficult to knock up a simple gui front-end to double check everything, make backups of existing keys if required, and display a couple of buttons you can click. With a bit of luck, all the icons would change so you would always know exactly where you are at.
Be warned that I haven't actually tried this, and you may need a 4.0 .cfg file to get the includes right, but I'm convinced it could be made to work, and quite slickly too.
Regards, Pete
15. Re: Euphoria Version 4.0
- Posted by mattlewis (admin) Sep 13, 2010
- 5173 views
Be warned that I haven't actually tried this, and you may need a 4.0 .cfg file to get the includes right, but I'm convinced it could be made to work, and quite slickly too.
While the eu.cfg file concept does not create file associations in windows, it's very easy to set up. First, it's a plain text file, so you don't need to use the clunky windows environment variable editor, nor mess with your registry. Also, you can set up a file in the directory where your program is, so that you can use different library locations for different applications if you need to (important if certain programs rely on a particular version of a file).
You can specify anything in the file that can be passed as a flag to the interpreter / translator / binder that can be passed on the command line. Also, any changes are immediate, since it is read whenever you execute euphoria, meaning that you don't have to start a new shell or log out before your changes take effect.
Matt
16. Re: Euphoria Version 4.0
- Posted by dcole Sep 13, 2010
- 5128 views
Thank you Kat, ChrisB, Irv, Pete and Matt.
Kat, Thank you, I'm sure your way will work but involves changing the name of all my ver3 or ver4 program file extensions.
Chris and Irv, Convert to 4 and dump 3 is a good idea. But all the programs I have written since 1998 are in ver 3. And they are working. I see no need to muck them up. So until I convert everything to 4(which may take a couple of years) I want keep 3 intact.
Pete, your way involves changing the registry. Something I'm not crazy about doing. BTW the way I use Edita in my two user configuration is I use two instances of Edita located on different drives. And set the ver3 file extensions to .exw and ver4 file extensions to .eui.
Matt, The config file would need some studying to set up, I'm lazy.
Chris, I'm going along with you and using the two user system. It doesn't require any further setting up.
Again I want to thank everybody for their help.
Don Cole
17. Re: Euphoria Version 4.0
- Posted by ChrisB (moderator) Sep 14, 2010
- 5079 views
Hi
You're very welcome
Chris
18. Simple way to use both versions 3.1 and 4.0
- Posted by Shian_Lee Jan 02, 2011
- 4331 views
- Last edited Jan 03, 2011
I just figured out how to run both Euphoria version 3.1.1 and version 4.0 beta 4 on same computer. Create 2 users( in Windows XP). And set the Environmental Variables accordingly.
Here is a very simple (but practical) way to use both Euphoria version 3.1 and version 4.0:
1. Install version 3.1 in "C:\EU3"
2. Install version 4.0 in "C:\EU4"
3. Set EUDIR=C:\EU
4. Set PATH=%PATH%;C:\EU
5. Now, when you want to use version 3.1 - rename "C:\EU3" to "C:\EU";
and, when you want to use version 4.0 - rename "C:\EU" back to "C:\EU3" and rename "C:\EU4" to "C:\EU"...
and so on.
It is very quick. You don't have to change any environment variables or create another user or a special batch file. And it works.
19. Re: Simple way to use both versions 3.1 and 4.0
- Posted by dcole Jan 02, 2011
- 4260 views
Thank you Shian Lee,
For your idea.
I'm no longer switching users. I'm using Kat's bat file to change Environmental Variables
First I setup Environmental Variables for ver3 as prescribed.
Then I use Pete Lomax's Edita to run my programs.
It has a file extensions section that tell you what to run by file extention.
.ex="e"\\euphoria\\bin\\ex.exe"--ver3 files .exw="e:\\euphoria\\bin\\exw.exe"--ver3 files .exwc--I really don't know what this is for. I'm using it as a dummy extention to run my ver4 files. .exec="e:\\euphoria-40B3\\bin\\celibate" </encode> That .bat file looks like this: <encode}> @@PATH=%PATH% E:\euphoria-40b4\bin--change the Environmental Variable PATH. @SET EUDIR=E:\euphoria-40b4 --change the Environmental Variable EUDIR. @SET EUINC=E:\euphoria-40b4\include;E:\eu\myinclude;e:\eu\football;e:\eu\win32lib--change the Environmental Variable EUINC. @start /b E:\euphoria-40b4\bin\eui.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 --start the ver4 eui.exe.
Once this is set up all you have to do to run version4 is change the file extension to .exwc.
Don Cole
20. Re: Euphoria Version 4.0
- Posted by jeremy (admin) Jan 03, 2011
- 4195 views
All the demos included with version 3
Yes, but I would assume that these are ver3 demos.
All the 3.1 demos have been upgraded to 4.0. 4.0 also includes quite a few new demos in the demos/ directory that are 4.0 specific.
Jeremy