1. Best Way To Learn

I'm curious is you could tell me the best way to learn Euphoria.  I just
finished the Beginners Guide but would like more material.  Any
suggestions?

Bryan

JJProg at CYBERBURY.NET wrote:

> Now just call GetRecord(f) for each record. Example:
>
> integer in, out, n
> object r
> in = open("infile.txt","r")
> if in = -1 then
>         puts(1,"Couldn't open infile.txt.\n")
>         abort(1)
> end if
> n = 1
> r = GetRecord(in)
> while sequence(r) do
>         out = open(sprintf("out%d.txt",n),"w")
>         if out = -1 then
>                 printf(1,"Couldn't open out%d.txt.\n",n)
>                 exit
>         end if
>         puts(out,r)
>         close(out)
>         n += 1
>         r = GetRecord(in)
> end while
> close(in)
>
> EU>Just a sec. I'll finish this in another e-mail.
>
> EU>Jeffrey Fielding
> EU>JJProg at cyberbury.net
> EU>http://members.tripod.com/~JJProg/

new topic     » topic index » view message » categorize

2. Re: Best Way To Learn

EU>I'm curious is you could tell me the best way to learn Euphoria.  I just
EU>finished the Beginners Guide but would like more material.  Any
EU>suggestions?

EU>Bryan

Sorry, I have no idea what the best way is to learn Euphoria. I just
read the documentation and looked at the demos, but I don't know what
would be the best way for you.

>I think that it works but I'm not sure.  It runs without any error
>message, but I can't find the output anywhere.  I search for the out
>file but none exists.  Does Euphoria put the output in the same
>directory the input file resides?

Well, the function I sent you (GetRecord) only returns the data in a
record. The example of using it should output a bunch of out1.txt,
out2.txt etc. files. It's possible that the code I wrote doesn't work
with your file - perhaps the lines end in \r\n instead of just \n. Try
changing the constants from START="ST\n" to START="ST\r\n" and
END="SE\n" to END="SE\r\n". Tell me if this doesn't work.

Jeffrey Fielding
JJProg at cyberbury.net
http://members.tripod.com/~JJProg/

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

3. Re: Best Way To Learn

Bryan,

Do it like I did, just putz with it, looking at documentation and pay
attention to the webpage and the list, and doing stuff on your own.

Mike Hurley

----- Original Message -----
From: Bryan Melugin <bmelugin at BELLSOUTH.NET>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Friday, July 23, 1999 5:58 PM
Subject: Best Way To Learn


> I'm curious is you could tell me the best way to learn Euphoria.  I just
> finished the Beginners Guide but would like more material.  Any
> suggestions?
>
> Bryan
>
> JJProg at CYBERBURY.NET wrote:
>
> > Now just call GetRecord(f) for each record. Example:
> >
> > integer in, out, n
> > object r
> > in = open("infile.txt","r")
> > if in = -1 then
> >         puts(1,"Couldn't open infile.txt.\n")
> >         abort(1)
> > end if
> > n = 1
> > r = GetRecord(in)
> > while sequence(r) do
> >         out = open(sprintf("out%d.txt",n),"w")
> >         if out = -1 then
> >                 printf(1,"Couldn't open out%d.txt.\n",n)
> >                 exit
> >         end if
> >         puts(out,r)
> >         close(out)
> >         n += 1
> >         r = GetRecord(in)
> > end while
> > close(in)
> >
> > EU>Just a sec. I'll finish this in another e-mail.
> >
> > EU>Jeffrey Fielding
> > EU>JJProg at cyberbury.net
> > EU>http://members.tripod.com/~JJProg/
>

________________________________________________________
NetZero - We believe in a FREE Internet.  Shouldn't you?
Get your FREE Internet Access and Email at
http://www.netzero.net/download/index.html

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

Search



Quick Links

User menu

Not signed in.

Misc Menu