Wiki Diff GettingStarted, revision #3 to tip

== Getting Started with Euphoria ==

This page is intended for those new to Euphoria (and to computers and programming in general) as a short, simple introduction on how to install and run their first text based program, and their first gui program, using the IDE. There are also additional links at the bottom for additional study.

This page is 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 [[http://www.openeuphoria.org/forum/index.wc|forum]].

=Step-by-Step to Your First Euphoria Program

# [[http://openeuphoria.org/docs/installation.html|Install Euphoria]]
# Install a text editor. You will need a text editor in order to create Euphoria programs. There are so many available out there, it's simply a matter of personal preference. However, we have compiled a list of Euphoria-compatible editors on our [[http://www.openeuphoria.org/wiki/wiki.cgi?Editors|Editors]] page. That's a good place to start. You can also search the site for more discussion of editors.
# Start your editor and type in the program below

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

# Save the program as "hello.ex"
# Open a console window, type "eui hello" and press ENTER
# Tada!

=Tutorials

The wiki has [[MiniGuides]] and [[http://openeuphoria.org/category/members.wc?category=Tutorial|Tutorials]].

See also our comprehensive list of TutorialsOnTheWeb.
== Getting Started with Euphoria ==

This page is intended for those new to Euphoria (and to computers and programming in general) as a short, simple introduction on how to install and run their first text based program, and their first gui program, using the IDE. There are also additional links at the bottom for additional study.

This page is 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 [[http://www.openeuphoria.org/forum/index.wc|forum]].

The RegularExpressions.org website is primarily focused on Euphoria 4.0. However, since it is not yet released, some of the instruction below applies to version 3.1.1, the last release of the 3.0 version. Once 4.0 is released, information relating to version 3 will be removed.

=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>

=Writing Programs that use a Graphical User Interface (GUI)=
A beginner's guide to Euphoria GUI programming, [[http://www.usingeuphoria.com/books/guiphoria/|GUIphoria]]

=Favorite Editors=

Check out the [[http://www.openeuphoria.org/wiki/wiki.cgi?Editors|Editors]] page for a comprehensive list of editors you can use for creating Euphoria programs.

=Links - Other Beginners Resources=

See Jules Davy's [[http://www.axyp43.dsl.pipex.com/abgte.html|web site conversion of David Gay's Beginner's Guide to Euphoria into a website]]\\
Bill Aitken's FREE book, [[http://www.rapideuphoria.com/euphoricMysteries%20v0.2.exe|Euphoric Mysteries]]\\
Online HTML book, [[http://www.usingeuphoria.com/books/jubilation/|Jubilation]]



Search



Quick Links

User menu

Not signed in.

Misc Menu