Wiki Diff AbsoluteBeginners, revision #5 to tip

This page is for those new to programming who want to know what to do when they first come across Euphoria.

I expect that you know what a computer is, that you know what folders, files, and file extensions are, and that you know what a text file is. This howto is also for windows only (although technically there's not a great deal of difference installing onto the wo operating systems)

This page will set you with an editor that has highlighting colouring, and an execute key to load / edit / experiment and run the programs.

It is not the only way to do things, and there will be many opinions of how to do stuff, but as soon as you have done this, you can then go on to find your own way.

I no longer recommend the use of ed.ex, as I believe the editor I have chosen (and there are many to choose from) has all the functionality you need to start programming in Euphoria.

----
//Note:\\
The rest of this page is obsolete. WEE is the preferred cross-platform editor, written in Euphoria for Euphoria programmers: https://github.com/peberlein/WEE/

It also appears that the context website is no longer accessible. 12/31/2020//

----
\\
\\
\\
\\
#Download and install the Context text editor from [[http://www.contexteditor.org/]]
#Download [[http://www.contexteditor.org/highlighters/Euphoria.chl]] and put it into the highlighters folder in the context folder.

You now have functioning editing environment. Fire up context and navigate to one of the demos.

To set up Context to run the program

#Options -> Environment options -> Execute keys tab
#Add button
#Enter "ex,exw,eui" (without the quotes), OK
#Select one of the function key choices that has appeared (eg F11)
#In the execute field, use the browse button to select c:\euphoria\bin\eui.exe (or wherever else you put the Eu install)
#In the parameters field enter "%f" (without the quotes)

And that's it. You can now run the program by pressing the F11 key, and see any output in the console window.

You could also set up euiw.exe on another function key, and there will be no console window (unless there's an error)

Once you've played around with this, setting up options and text colours etc, and running a few programs, you are more than welcome to set up your own favourite editor.

Enjoy.

Chris
=Background=

This page is intended to show the absolute beginner (new to computers, programming and euphoria) how to install and run their first text based program, and their first gui program, using the IDE.

Its not intended to teach you how to program - there are many other places that will do that (please add your own links at the bottom!), and you can always ask on the list.

Note with the rapid development of eu4, this page will undergo heavy re organisation. Certainly I will retain the eu3.1 files for now, but they will become obsolete fairly quickly.

=Install euphoria=
#goto [[http://www.box.net/shared/u18aiv9xln]] or [[http://superb-east.dl.sourceforge.net/sourceforge/rapideuphoria/Eu3.1-Win32Setup.exe]] and run the setup program.
This will also setup the environment variables necessary to allow euphoria to run.
#Test the installation
Navigate, using windows explorer to c:\euphoria\win32lib0704\Demo then find RunDemos.exw and double click on it. Voila, you should see a window, with a list of other programs to run, double click on them to run them, and right click on them to open up the editor (more later). For now, just close it.

=Write a console or text based program=
#Open a dos box (this may not work on Vista, I haven't tested it, so I don't know. I do know that the free and excellent DosBox program runs fine on Vista though, but thats a separate issue). A dos box is also known as a console, and the terms may be interchanged here frequently.
#To open a dos box in XP, Start->Run then type command (press ok) - this will open a black box with whats call the prompt - it will look something like\\
c:\> or C:\DOCUME~1\USER>\\
# type cd \ (press enter) (you have just navigated to the root of the hard drive)
# type cd \euphoria\demo (press enter) (you have just navigated to the euphoria demo directory)
# type ed fprog.ex (press enter)
# you will be presented with the blank editing screen
type the following code, each line on a different line, at the end of each line hit enter. Do not copy and paste - it will not work, don't be so lazy!
# don't worry what each of these lines mean, its just to show how to use ed
# note how the for loop is auto completed for you
# when you are done, press ESC then e - the program will run, or show you where you entered any typing errors.

<eucode>
integer x
sequence s

s = "Hello world"

for i = 1 to 10 do
x = i * 2
printf(1, "%d %d\n", {i, x})
end for

puts(1, s & "\n")
puts(1, "You've just written your first program!\n"
</eucode>


=Write a gui program using the IDE=



=Links - favourite editors=

=Links - other beginners resources=


Search



Quick Links

User menu

Not signed in.

Misc Menu