1. Inputting commands

As I said earlier, I have no idea how to use Euphoria very well. How to
input data from the user? Anyone wanna help me with some basic commands?
PLEASE?! If
you have ICQ, you can help. UIN: 6626887
--
Sublime Productions: members.tripod.com/~SublimePro/index.html

new topic     » topic index » view message » categorize

2. Re: Inputting commands

SonicGreen wrote:

>As I said earlier, I have no idea how to use Euphoria very well. How to
>input data from the user? Anyone wanna help me with some basic commands?

and

> GIVE ME A TUTORIAL QUICK! I NEED ON BESIDES ABGTE2!!

and further:

> I am used to using QBasic and I can't seem to get into the Euphoria
> world. I tried ABGTE2 and it didn't help much. HEEEELP!

and finally:

> I would at least expect an answer as fast as everyone else, jeez


Did you look at what you wrote before you pressed the Send button on your
e-mail? Your tone goes from desperate to demanding to insulting and rude -
not really a way to encourage people to respond. And you posted these things
at 11:00 Saturday night! Reality check time.

On one hand, you're asking for a basic guide to Euphoria, and on the other
you are rejecting ABGTE - something intended to provide exactly that
information. I've heard only good things about it - is there something in
particular about it that fails to meet your needs?

Your question is *too* open ended - could you be more specific as to what
*exactly* you are having trouble with? Perhaps a bit more background on your
problem would be helpful. For example:

- Is there a particular type of input you want from the user? A string of
characters, a number, or what?

- What have you tried to do, and where are you having trouble? Give example
code.

- Is there a particular command you don't understand, or some concept you
are having trouble with?

- Are you getting results that are unexpected?

- Are you getting results at all?

If you are trying to get input akin to a QBASIC INPUT command, you can try
this:

   -- this will hold your input
   sequence s

   -- 'puts' is short for 'put string'
   -- oops. make that 'put sequence'...  blink
   -- this is akin to the print command.
   -- the '1' specifies the output file as the screen
   puts( 1, "What is your name? " )

   -- 'gets' is short for 'get string'
   -- or, 'get sequence...'
   -- this is akin to the input command
   -- the '0' specifies the input file is the keyboard
   s = gets( 0 )

   -- display the ASCII code of what the user entered:
   -- the '?' is a sort of "raw" display function
   ? s

   -- display the string the user typed
   -- note the '&' is used to concatonate strings
   puts( 1, "You typed: " & s )

Unlike QBASIC, gets() includes *everything* the user types. So if you did
this:

   What is your name? Me
   {77,101,10}
   You typed: Me

The string is 3 bytes long:

   77 = 'M'
   101 = 'e'
   10 = line feed

Here's a simple simulation of an INPUT statement:

   function input( sequence prompt )
      -- qbasic like input
      sequence s

      -- display prompt
      put( 1, prompt & "? " )

      -- get input
      s = get( 0 )

      -- remove the line feed
      s = s[1..length(s)-1]

      -- return trimmed result
      return s

   end function

If you want a simple user input function that handles the escape key and the
like, you can download "Simple User Input Routine" from
http://members.aol.com/FilesEu/exestuff.htm

As for a tutorial, try checking out a basic tutorial on 'C' - most of the
I/O functions have close analogs there. Just ignore all the pointer stuff -
Euphoria handles that much more elegantly.

Hope this helps!

-- David Cuny

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

3. Re: Inputting commands

David Cuny wrote:

> SonicGreen wrote:
>
> >As I said earlier, I have no idea how to use Euphoria very well. How to
> >input data from the user? Anyone wanna help me with some basic commands?
>
> and
>
> > GIVE ME A TUTORIAL QUICK! I NEED ON BESIDES ABGTE2!!
>
> and further:
>
> > I am used to using QBasic and I can't seem to get into the Euphoria
> > world. I tried ABGTE2 and it didn't help much. HEEEELP!
>
> and finally:
>
> > I would at least expect an answer as fast as everyone else, jeez
>
> Did you look at what you wrote before you pressed the Send button on your
> e-mail? Your tone goes from desperate to demanding to insulting and rude -
> not really a way to encourage people to respond. And you posted these things
> at 11:00 Saturday night! Reality check time.
>
> On one hand, you're asking for a basic guide to Euphoria, and on the other
> you are rejecting ABGTE - something intended to provide exactly that
> information. I've heard only good things about it - is there something in
> particular about it that fails to meet your needs?
>
> Your question is *too* open ended - could you be more specific as to what
> *exactly* you are having trouble with? Perhaps a bit more background on your
> problem would be helpful. For example:
>
> - Is there a particular type of input you want from the user? A string of
> characters, a number, or what?
>
> - What have you tried to do, and where are you having trouble? Give example
> code.
>
> - Is there a particular command you don't understand, or some concept you
> are having trouble with?
>
> - Are you getting results that are unexpected?
>
> - Are you getting results at all?
>
> If you are trying to get input akin to a QBASIC INPUT command, you can try
> this:
>
>    -- this will hold your input
>    sequence s
>
>    -- 'puts' is short for 'put string'
>    -- oops. make that 'put sequence'...  blink
>    -- this is akin to the print command.
>    -- the '1' specifies the output file as the screen
>    puts( 1, "What is your name? " )
>
>    -- 'gets' is short for 'get string'
>    -- or, 'get sequence...'
>    -- this is akin to the input command
>    -- the '0' specifies the input file is the keyboard
>    s = gets( 0 )
>
>    -- display the ASCII code of what the user entered:
>    -- the '?' is a sort of "raw" display function
>    ? s
>
>    -- display the string the user typed
>    -- note the '&' is used to concatonate strings
>    puts( 1, "You typed: " & s )
>
> Unlike QBASIC, gets() includes *everything* the user types. So if you did
> this:
>
>    What is your name? Me
>    {77,101,10}
>    You typed: Me
>
> The string is 3 bytes long:
>
>    77 = 'M'
>    101 = 'e'
>    10 = line feed
>
> Here's a simple simulation of an INPUT statement:
>
>    function input( sequence prompt )
>       -- qbasic like input
>       sequence s
>
>       -- display prompt
>       put( 1, prompt & "? " )
>
>       -- get input
>       s = get( 0 )
>
>       -- remove the line feed
>       s = s[1..length(s)-1]
>
>       -- return trimmed result
>       return s
>
>    end function
>
> If you want a simple user input function that handles the escape key and the
> like, you can download "Simple User Input Routine" from
> http://members.aol.com/FilesEu/exestuff.htm
>
> As for a tutorial, try checking out a basic tutorial on 'C' - most of the
> I/O functions have close analogs there. Just ignore all the pointer stuff -
> Euphoria handles that much more elegantly.
>
> Hope this helps!
>
> -- David Cuny

 So you get mad at me and then help me? Screw you and your little Mac PC demo

--
Sublime Productions: members.tripod.com/~SublimePro/index.html

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

4. Re: Inputting commands

SonicGreen wrote:

> David Cuny wrote:
>
> <SNIPPPPP!>

>  So you get mad at me and then help me? Screw you and your little Mac PC demo
>
> --
> Sublime Productions: members.tripod.com/~SublimePro/index.html

  Maybe if you would not be so angry when you read posts, or then again when you
post, you would see that all David was trying to say was that your questions
were
too vague.  Something like this one:
"Ok, I've learned to drive a car...how can I use that information to fly a
plane?"

Seriously, people on here are usually friendly, and you often get many answers
to
SPECIFIC questions.  What you were saying with yours was "Ok, its late night
Saturday.  I have nothing specific to say, so I'll just ask for help on Euphoria
in general.  I'll then proceed to say ABGTE was crap, and maybe that'll inspire
someone to either write another tutorial, or even to be my mentor, and I'll pick
their brain for code at every step.  When someone does return my posts, I say
'screw you' and hope they'll believe I was just kidding."

Basically, with the way you responded to David, it would be safe to say that
many
of your posts will be ignored in the future.  My suggestion?  Apologize.  Move
on,
start asking more specific questions, and respond to anything politely.  This
listserve is not the place for flamewars - go to some Usenet group if that is
what
you are looking for.

Kevin

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

5. Re: Inputting commands

Green Slime just wrote:

> So you get mad at me and then help me? Screw you and your little Mac PC
demo
>
>--
>Sublime Productions: members.tripod.com/~SublimePro/index.html
>

David, just ignore the creep, he will fade away. jiri

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

6. Re: Inputting commands

What does "Sublime" mean?
I vote for Stupid, Unfriendly, Boring, ...

.
>
>  So you get mad at me and then help me? Screw you and your little Mac PC
demo
>
> --
> Sublime Productions: members.tripod.com/~SublimePro/index.html

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

7. Re: Inputting commands

>Basically, with the way you responded to David, it would be safe to say
that many
>of your posts will be ignored in the future.  My suggestion?  Apologize.
Move on,
>start asking more specific questions, and respond to anything politely.
This
>listserve is not the place for flamewars - go to some Usenet group if that
is what
>you are looking for.


That's too gentle for "SonicGreen" attitude.... Can we expel him from the
listserver?

BTW SonicGreen, don't expect any help from me, now and in the future.

Regards (but SonicGreen),
    Daniel Berstein
    daber at pair.com

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

8. Re: Inputting commands

Daniel Berstein wrote:

> >Basically, with the way you responded to David, it would be safe to say
> that many
> >of your posts will be ignored in the future.  My suggestion?  Apologize.
> Move on,
> >start asking more specific questions, and respond to anything politely.
> This
> >listserve is not the place for flamewars - go to some Usenet group if that
> is what
> >you are looking for.
>
> That's too gentle for "SonicGreen" attitude.... Can we expel him from the
> listserver?
>
> BTW SonicGreen, don't expect any help from me, now and in the future.
>
> Regards (but SonicGreen),
>     Daniel Berstein
>     daber at pair.com

  Yes, SG's response was short of desirable.  I, being a Christian, like to
turn the other cheek on insults (although these were aimed at David Cuny), so I
tried the gracious route.  Grace?  Unmerited favor.  But since SG has not since
responded I would assume his tirade was temporary, and that he has left us for
now.

Hehe, I never have anything good to contribute...gotta start writing some
programs!!

Kevin

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

Search



Quick Links

User menu

Not signed in.

Misc Menu