1. Euphoria Version 4.0

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

new topic     » topic index » view message » categorize

2. Re: Euphoria Version 4.0

dcole said...

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

dcole said...

Are there any ver 4.0 demos?

All the demos included with version 3

dcole said...

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

new topic     » goto parent     » topic index » view message » categorize

3. Re: Euphoria Version 4.0

ChrisB said...

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?

new topic     » goto parent     » topic index » view message » categorize

4. Re: Euphoria Version 4.0

Maybe because there's no get_i_could_care_less_box function? :)

new topic     » goto parent     » topic index » view message » categorize

5. Re: Euphoria Version 4.0

irv said...

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!)

new topic     » goto parent     » topic index » view message » categorize

6. Re: Euphoria Version 4.0

petelomax said...
ChrisB said...

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 smile

Chris

new topic     » goto parent     » topic index » view message » categorize

7. Re: Euphoria Version 4.0

irv said...

Maybe because there's no get_i_could_care_less_box function? :)


You could care less? So you do care some?

useless

new topic     » goto parent     » topic index » view message » categorize

8. Re: Euphoria Version 4.0

useless said...
irv said...

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".

new topic     » goto parent     » topic index » view message » categorize

9. Re: Euphoria Version 4.0

DerekParnell said...
useless said...
irv said...

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

new topic     » goto parent     » topic index » view message » categorize

10. Re: Euphoria Version 4.0

ChrisB said...

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.

ChrisB said...

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.

ChrisB said...

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

new topic     » goto parent     » topic index » view message » categorize

11. Re: Euphoria Version 4.0

dcole said...

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

new topic     » goto parent     » topic index » view message » categorize

12. Re: Euphoria Version 4.0

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

new topic     » goto parent     » topic index » view message » categorize

13. Re: Euphoria Version 4.0

ChrisB said...

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)

new topic     » goto parent     » topic index » view message » categorize

14. Re: Euphoria Version 4.0

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

new topic     » goto parent     » topic index » view message » categorize

15. Re: Euphoria Version 4.0

petelomax said...

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

new topic     » goto parent     » topic index » view message » categorize

16. Re: Euphoria Version 4.0

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

new topic     » goto parent     » topic index » view message » categorize

17. Re: Euphoria Version 4.0

Hi

You're very welcome smile

Chris

new topic     » goto parent     » topic index » view message » categorize

18. Simple way to use both versions 3.1 and 4.0

dcole said...

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.

new topic     » goto parent     » topic index » view message » categorize

19. Re: Simple way to use both versions 3.1 and 4.0

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

new topic     » goto parent     » topic index » view message » categorize

20. Re: Euphoria Version 4.0

dcole said...
ChrisB said...

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

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu