1. Hi

Hi,

At the begining of my program I have a couple of constants and I don't use
them all in my program and when I run it, ex complains that I don't use them.
Can I stop this?

Albert

new topic     » topic index » view message » categorize

2. Re: Hi

At 05:38 PM 11/29/98 EST, you wrote:
>Hi,
>
>At the begining of my program I have a couple of constants and I don't use
>them all in my program and when I run it, ex complains that I don't use them.
>Can I stop this?
>
>Albert
>


type:

without warning

at the beginning of your prog

                isaac

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

3. Hi

Albert writes:
>At the begining of my program I have a couple of constants and I don't u=
se
>them all in my program and when I run it, ex complains that I don't use
them.
>Can I stop this?

>Albert

put 'without warning' as the first line in your program.

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

4. Re: Hi

Hi Vince,

Welcome to the the list and welcome to Euphoria.

The doco that comes with Euphoria is pretty comprehensive.

If you have any programming experience you should find it pretty easy
to get going.
When I started I read the refman, and then browsed the library reference.
(and I'm always looking for things in the library reference even now!!)

The list is the best resource for finding out answers to any problems
you can't solve with the doco.

The other great resource to look into are the libraries many people
have created using/for Euphoria ... most being available at the Euphoria
web page.  There are so many libraries that are very useful. It would take
you days to check them all out.

Have fun,

Ray Smith


>Hello,
>
>    My name is Vince, just joined the mailing list.  THought I would take
the time to intro myself.  Just got Euphoria this morning, and it looks to
be really good, I look forward to learning it, and I'm happy to know that
there is a place to post my inevitable questions about the lang.  I also
got that beginners guide to euphoria II, it seems pretty good, but still a
bit confusing at times.  I have working knowledge of BASIC, QBASIC, C/C++,
PASCAL and VB, so programming in general isn't new to me, its more a matter
of learning a new syntax.  The atoms/sequences/objects thing is a bit much
to understand (I'm used to seperate vars for int, char, double, float.
Anyhoo, just puttin my 2 cents in, so you don't see this anonymous question
from some strange guy you never heard of b4.
>
>Vince
>

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

5. Hi

------=_NextPart_000_0014_01C063B5.825AE800
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello,=20

    My name is Vince, just joined the mailing list.  THought I would =
take the time to intro myself.  Just got Euphoria this morning, and it =
looks to be really good, I look forward to learning it, and I'm happy to =
know that there is a place to post my inevitable questions about the =
lang.  I also got that beginners guide to euphoria II, it seems pretty =
good, but still a bit confusing at times.  I have working knowledge of =
BASIC, QBASIC, C/C++, PASCAL and VB, so programming in general isn't new =
to me, its more a matter of learning a new syntax.  The =
atoms/sequences/objects thing is a bit much to understand (I'm used to =
seperate vars for int, char, double, float.  Anyhoo, just puttin my 2 =
cents in, so you don't see this anonymous question from some strange guy =
you never heard of b4. =20

Vince

------=_NextPart_000_0014_01C063B5.825AE800
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello, </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; My name is Vince, =
just joined=20
the mailing list.&nbsp; THought I would take the time to intro =
myself.&nbsp;=20
Just got Euphoria this morning, and it looks to be really good, I look =
forward=20
to learning it, and I'm happy to know that there is a place to post my=20
inevitable questions about the lang.&nbsp; I also got that beginners =
guide to=20
euphoria II, it seems pretty good, but still a bit confusing at =
times.&nbsp; I=20
have working knowledge of BASIC, QBASIC, C/C++, PASCAL and VB, so =
programming in=20
general isn't new to me, its more a matter of learning a new =
syntax.&nbsp; The=20
atoms/sequences/objects thing is a bit much to understand (I'm used to =
seperate=20
vars for int, char, double, float.&nbsp; Anyhoo, just puttin my 2 cents =
in, so=20
you don't see this anonymous question from some strange guy you never =
heard of=20
b4.&nbsp; </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>

------=_NextPart_000_0014_01C063B5.825AE800--

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

6. Re: Hi

Hello Vince!

>The atoms/sequences/objects thing is a bit much to understand (I'm used to
>seperate vars for int, char, double, float.

Having worked with APL once in the dim past, I immediately understood and
took to the Euphoria types scheme. It is actually both incredibly convenient
and incredibly powerful, once you do get the hang of it.

For those who don't know, APL is an old, interpreted programming language
that, to oversimplify, revolves around the idea of composing functions on
scalars (atoms) and arrays (sequences) of arbitrary size and dimension. APL
has its own character set, that includes Greek letters and a lot of "funny"
made-up characters. The functions are represented by single characters, for
the most part. APL programs tend to be quite (sometimes incredibly) compact
- and quite unreadable. (APL is the classic "write-only" language.) Euphoria
provides most of that power and a good deal of the compactness, without
sacrificing readability.

Another advantage of Euphoria is that its syntax is pretty similar to C/C++
and Java, so it's quite approachable by programmers who have some experience
in those languages.

While no programming language can do all things for everyone better than any
other, Euphoria has its advantages, and I think you will find it a pleasure
to use, overall.

Most of the time you can conveniently ignore the details of the internal
representation of data (as in, is it a one-byte or a two-byte or a four-byte
integer, or is it a 4-byte float, 8-byte double, or whatever), and when
that's not the case, there are built-in functions and features to help you
out.

Carry on!
George
_____________________________________________________________________________________
Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com

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

7. Re: Hi

Vince wrote:
> The atoms/sequences/objects thing is a bit much to understand
> (I'm used to seperate vars for int, char, double, float.  Anyhoo,

There isn't anything to understand.
You declare variables using:

object my_var

And then you use it. String, number, float, int, whatever you assign to it,
it will work.

Only to speed up the performance and to make sure your program is running
correctly you could choose to be more specific about the data assigned to
the variable:

integer my_int

However, when you declare something as an 'atom' it doesn't nessecarily mean
that its stored as a floating point value internally. When integer math can
do the job, it will use just that and convert the value when it 'gets out of
range'.

You could even write your own 'datatypes'. The purpose of this is not speed
(it won't help much), but to get the right kind of error message when
something goes wrong in your program. The problem will be caught where it
happens, not where it makes your program crash. Example:

constant
TRUE = 1,
FALSE = 0

type hour (object o)
-- integer values from 1 to 24 are legal

    if integer(o) and o > 0 and o < 25 then
        return TRUE
    else
        return FALSE
    end if

end type

Now, would you accidently assign "this piece of text" to that variable,
Euphoria will halt your program and tell you so. ("type check error").
Normally such a thing would only cause a problem when the value is used and
then you have to search for hours where the mis-placed value is coming from.

Good luck,

Ralf N.
nieuwen at xs4all.nl

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

8. Hi

Hi Everyone
    My name is Daryl. I am new to the mailing list. I saw vince's intro and
thought it a good idea that I write one. I just discovered Euphoria one day
and haven't looked back. The idea of sequences and atoms is excellent and
makes some things that are difficult in Qbasic and VB much easier. To Vince:
I used only the Docs provided with Euphoria to learn how to use it. It's an
easy language to learn.
_____________________________________________________________________________________
Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com

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

9. Hi

Hi, my name is Ken Furlong, I just downloaded Euphoria and signed up for
the mailing list.  I thought I'd take a minute to intoduce myself.  I'm
just an ameture programer who aspires to be a pro someday.  I've had a
little experience in QBasic and Borland C++.

I had a question, in QBasic and C++, you can name blocks of code so that
you can go to them from, say, an if-then statment instead of writing the
whole thing out under the if-then.  I think in QBasic you use Gosub.  I
was wondering if there was an Euphoria version of the Gosub command.


Thanks!
Ken Furlong smile

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

10. Re: Hi

At 02:33 p.m. 16-01-99 -0500, you wrote:
>Hi, my name is Ken Furlong, I just downloaded Euphoria and signed up for
>the mailing list.  I thought I'd take a minute to intoduce myself.  I'm
>just an ameture programer who aspires to be a pro someday.  I've had a
>little experience in QBasic and Borland C++.

Welcome Ken! If you're patient you'll be facinated with Euphoria. Please
try to clean the knowledge you've got from Qbasic. As a former Atari
basic programer (when I was a kid) I do have a nostalgic feeling about
it, but as a programming language it sucks.

I must warn you that just yesterday a new alpha version (2.1) of Euphoria
was released, you'll see lot's of very specific & technical post during the
following days regarding bugs (I hope not), further enhancements and the
like. Don't be intimidated with such messages, this mailing list *is* the
right place to post all your questions about Euphoria, no matter how stupid
you may thing they are.

>I had a question, in QBasic and C++, you can name blocks of code so that
>you can go to them from, say, an if-then statment instead of writing the
>whole thing out under the if-then.  I think in QBasic you use Gosub.  I
>was wondering if there was an Euphoria version of the Gosub command.

As a matter of programming philosophy Euphoria doesn't have a block
labeling mechanism, you must structure your algorithm to avoid this
situations. Feel free to post any code snippet you're having troubles to
structure.

Always remembers that an algorithm that requires this "special" exit states is
usually not the best algorithm. Certainly there will be ocassions where such a
labeling mechanism can simplify things, but at the cost of redability and
conceptual un-clarity.




Regards,
        Daniel   Berstein
        daber at pair.com

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

11. Re: Hi

Daniel Berstein wrote:

> At 02:33 p.m. 16-01-99 -0500, you wrote:
> >Hi, my name is Ken Furlong, I just downloaded Euphoria and signed up for
> >the mailing list.  I thought I'd take a minute to intoduce myself.  I'm
> >just an ameture programer who aspires to be a pro someday.  I've had a
> >little experience in QBasic and Borland C++.
>
> Welcome Ken! If you're patient you'll be facinated with Euphoria. Please
> try to clean the knowledge you've got from Qbasic. As a former Atari
> basic programer (when I was a kid) I do have a nostalgic feeling about
> it, but as a programming language it sucks.
>
> I must warn you that just yesterday a new alpha version (2.1) of Euphoria
> was released, you'll see lot's of very specific & technical post during the
> following days regarding bugs (I hope not), further enhancements and the
> like. Don't be intimidated with such messages, this mailing list *is* the
> right place to post all your questions about Euphoria, no matter how stupid
> you may thing they are.
>

I think the version I donwloaded was just V2, but I'm not sure.  About bugs
though, I think I found one on Win98, I e-mailed RDS about it - hope it doesn't
cause any big problems.

> >I had a question, in QBasic and C++, you can name blocks of code so that
> >you can go to them from, say, an if-then statment instead of writing the
> >whole thing out under the if-then.  I think in QBasic you use Gosub.  I
> >was wondering if there was an Euphoria version of the Gosub command.
>
> As a matter of programming philosophy Euphoria doesn't have a block
> labeling mechanism, you must structure your algorithm to avoid this
> situations. Feel free to post any code snippet you're having troubles to
> structure.
>
> Always remembers that an algorithm that requires this "special" exit states is
> usually not the best algorithm. Certainly there will be ocassions where such a
> labeling mechanism can simplify things, but at the cost of redability and
> conceptual un-clarity.
>

Could I write my own procedure and then use it like gosub except of course for
including the variable values in the ( ) when I call it.  Wouldn't this work
basically the same way with an if-then?

i.e.  -

if var1 = 1
then my_procedure(*,*,*)

etc.....

Thanks!
Ken Furlong smile




> Regards,
>         Daniel   Berstein
>         daber at pair.com

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

12. Re: Hi

>Could I write my own procedure and then use it like gosub except of course
for
>including the variable values in the ( ) when I call it.  Wouldn't this work
>basically the same way with an if-then?
>
>i.e.  -
>
>if var1 = 1
>then my_procedure(*,*,*)
>
>etc.....

You can do that, but once my_procedure finish the execution will continue
on the
next statement of the calling routine!

What I understood was that you wanted something like:

procedure silly_test_procedure()
        [...]
        if a = b then
                if c = d then
                        if f = g then
                                jump_to CONTINUE
                        else
                                [...]
                        end if
                end if
        end if
        [...]
CONTINUE:
        [...]
end procedure

This *can't* be done with Euphoria. You're try was:

procedure two()
        [...]
end procedure

procedure one()
        [...]
        if a = b then
                if c = d then
                        if f = g then
                                two()   -- Won't help
                        else
                                [...]
                        end if
                end if
        end if
        [...]
end procedure

What you *can* do is exit a procedure before it reaches the "end procedure"
with the "return" statement. You should modularize your code into simpler
routines and call them consecuently with the expected runtime flow of the
program.

Also (as an advanced Euphoria programming technique) you can use the
"routine_id" and "call_proc"/"call_func" to perform dynamic code execution
based on runtime events.

Block labeling is mostly used for exiting deeply nested code, try to avoid
such coding where possible. A smart use of if..then..else and choosing the
right code for the right routines will help you get out of these
situations. As I said before, when in trouble post your code, 230+
programmers think better than one ;)


Saludos,
        Daniel   Berstein
        daber at pair.com

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

13. Re: Hi

On Sat, 16 Jan 1999 14:33:30 -0500, Ken Furlong <stjohn15 at ENTER.NET> wrote:

>Hi, my name is Ken Furlong, I just downloaded Euphoria and signed up for
>the mailing list.  I thought I'd take a minute to intoduce myself.  I'm
>just an ameture programer who aspires to be a pro someday.  I've had a
>little experience in QBasic and Borland C++.
>
>I had a question, in QBasic and C++, you can name blocks of code so that
>you can go to them from, say, an if-then statment instead of writing the
>whole thing out under the if-then.  I think in QBasic you use Gosub.  I
>was wondering if there was an Euphoria version of the Gosub command.
>

Hi Ken, and welcome.

Gosub in basic is just a subroutine call.
If you have no parameters to pass, you can replace it with
a procedure. Example:

if balance < 0 then gosub Overdrawn <-- basic
if balance < 0 then Overdrawn() <-- euphoria
end if

if you need to get a return value, then use a function:
balance = Sum(4,6,8)

Just remember that the procedures and functions MUST be declared
before they can be called! This is normal procedure for many languages,
but not necessarily for all.
Example:
procedure Overdrawn()
  puts(1,"Oh,oh, your account is overdrawn!');
end procedure -- this returns automatically when done

function Sum(sequence s)
atom total
  total = 0
  for i = 1 to length(s) do
    total = total + s[i]
  end for
  return total
end function

balance = Sum(3,44,7,-23,-55) -- note: upper and lower case counts!
if balance < 0 then Overdrawn() -- sum is not the same as Sum or SUM
end if

There is not a goto in Euphoria, nor is one needed.

HTH
Irv

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

14. Re: Hi

Thanks for the message,

Um, about using the return statment, could I write a procedure and simply put
return( ) on the last line before end procedure and this would return the
program
to the if-then or whatever else that had called it?

Thanks!
Ken Furlong smile


Daniel Berstein wrote:

> >Could I write my own procedure and then use it like gosub except of course
> for
> >including the variable values in the ( ) when I call it.  Wouldn't this work
> >basically the same way with an if-then?
> >
> >i.e.  -
> >
> >if var1 = 1
> >then my_procedure(*,*,*)
> >
> >etc.....
>
> You can do that, but once my_procedure finish the execution will continue
> on the
> next statement of the calling routine!
>
> What I understood was that you wanted something like:
>
> procedure silly_test_procedure()
>         [...]
>         if a = b then
>                 if c = d then
>                         if f = g then
>                                 jump_to CONTINUE
>                         else
>                                 [...]
>                         end if
>                 end if
>         end if
>         [...]
> CONTINUE:
>         [...]
> end procedure
>
> This *can't* be done with Euphoria. You're try was:
>
> procedure two()
>         [...]
> end procedure
>
> procedure one()
>         [...]
>         if a = b then
>                 if c = d then
>                         if f = g then
>                                 two()   -- Won't help
>                         else
>                                 [...]
>                         end if
>                 end if
>         end if
>         [...]
> end procedure
>
> What you *can* do is exit a procedure before it reaches the "end procedure"
> with the "return" statement. You should modularize your code into simpler
> routines and call them consecuently with the expected runtime flow of the
> program.
>
> Also (as an advanced Euphoria programming technique) you can use the
> "routine_id" and "call_proc"/"call_func" to perform dynamic code execution
> based on runtime events.
>
> Block labeling is mostly used for exiting deeply nested code, try to avoid
> such coding where possible. A smart use of if..then..else and choosing the
> right code for the right routines will help you get out of these
> situations. As I said before, when in trouble post your code, 230+
> programmers think better than one ;)
>
> Saludos,
>         Daniel   Berstein
>         daber at pair.com

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

15. Re: Hi

On Sat, 16 Jan 1999 19:46:51 -0500, Ken Furlong <stjohn15 at ENTER.NET> wrote:

>Thanks for the message,
>
>Um, about using the return statment, could I write a procedure and simply put
>return( ) on the last line before end procedure and this would return the
>program
>to the if-then or whatever else that had called it?
>

You could, but a procedure returns automatically without one:
if balance < 0 then Overdrawn() -- after the Overdrawn procedure,
execution resumes here --> maybe some other stuff
end if

It is possible to use a return in a procedure to return early,
based on some value:

procedure Overdrawn(atom amount)
if amount < 10.00 then
   puts(1,'Your account is slightly overdrawn!')
   return
   puts(1,'You are a lot overdrawn!!')
end if
end procedure

but it's not usually a good idea, since the same thing will
make more sense as:
procedure Overdrawn(atom amount)
 if amount < 10.00 then puts(1,'Your account.....')
 elsif amount < 100.00 then put(1,'Way over...')
 else puts(1,'The sheriff is on his way...')
end if
end procedure

Irv

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

16. Re: Hi

At 07:46 p.m. 16-01-99 -0500, you wrote:
>Thanks for the message,
>
>Um, about using the return statment, could I write a procedure and simply put
>return( ) on the last line before end procedure and this would return the
program
>to the if-then or whatever else that had called it?

As I explained before the return statement (without the parenthesis) can be
used to exit the procedure before it reaches the "end procedure".
Example:

procedure ImOldEnough(integer age)
        if age > 18 then
                puts(1, "You are old enough")
                return
        end if
        puts(1, "You are not old enough")
end procedure

The example is very trivial, but shows the point. Instead of using the
return statement I would used an "else" for better readability.


Regards,
        Daniel   Berstein
        daber at pair.com

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

17. Hi

This is a multi-part message in MIME format.

------=_NextPart_000_0017_01C26F07.74A1A500
	charset="iso-8859-1"

Hi I am having problems with the program. Every time i open it and type =
in the exw.exe or what ever it is it always says press enter then =
closes!
Well i would also like to know if I can write game software with the =
program

------=_NextPart_000_0017_01C26F07.74A1A500
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi I am having problems with the =
program. Every=20
time i open it and type in the exw.exe or what ever it is it always says =
press=20
enter then closes!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Well i would also like to know if I can =
write game=20

------=_NextPart_000_0017_01C26F07.74A1A500--

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

18. Re: Hi

Hello Aaron,

If I understand you correctly, the "program" you're speaking of, exw.exe, is
a programming language INTERPRETER, named Euphoria;  that means it
"interprets" or "runs" a file of source code, which would be some file you
write or wish to have executed which is written using the Euphoria language
commands.  The easiest way to see this is to pick a demo program from the
demo folder, look into it with any text editor to see what it looks like, &
then do one of the two things below.

To run a Euphoria program with the interpreter, you have to either enter
both the interpreter & the source filename on a command line:

for dos program type:
ex.exe whatever.ew

or

for windows program type:
exw.exe whatever.exw

Or you can associate the .exw & .ex file types with their respective
interpreters, so that clicking on any *.exw or *.ex source will cause them
to be interpreted & run.

And yes, in general, you can write games with Euphoria.

Dan Moyer


----- Original Message -----
From: <aaron_mr_cooldude at sympatico.ca>
To: "EUforum" <EUforum at topica.com>
Sent: Tuesday, October 08, 2002 5:15 PM
Subject: Hi



Hi I am having problems with the program. Every time i open it and type in
the exw.exe or what ever it is it always says press enter then closes!
Well i would also like to know if I can write game software with the program

==^^===============================================================
This email was sent to: DANIELMOYER at prodigy.net

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

Search



Quick Links

User menu

Not signed in.

Misc Menu