Re: Declaring a Function Before it is used

new topic     » goto parent     » topic index » view thread      » older message » newer message

No, I did not notice that there was already forward referencing.  I had to
completely change what I wanted to do with the program and do something
different (well, I could have done that or either had that function in the
program twice....although I actually realized t hat wouldn't work either,
because what I was wanting was an endless loop where you kept going back to
the same function if you hadn't entered something correctly, but if you had
entered correctly, you moved on to a different one). I was using routine_id
at the time...actually I wasn't too upset about not being able to forward
reference, because I had seen that you could use routine_id to do that.  So,
that's what I was using.  But I still got errors because I coudn't get the
functions in the right order.  See, I had (and all of this has already been
deleted when I rewrote it completely) but I had about 3 to 4 functions
involved, actually.  Something similiar to.... (and sorry, I ALWAYS say
functions, even though in this case I REALLY mean
procedures..but...something similiar to this..)

Run Procedure 1
Run Procedure 2
Run Procedure 3
If you entered correctly Goto Procedure 4 else return to Procedure 1

In this particular case..I heaved a heavy sigh and changed what I wanted to
do...instead of giving the person a chance to return to Procedure 1 and
correct what they had entered, I simply kicked them off the server and made
them start over by manually reconnecting (this is a socket server).

Because this is where they were being asked to create a user name and  a
password, it was very early on in the program, and I COULD do that, even
though I didn"t WANT to do that.  However, I'm afraid that when this issue
comes up again, later in the program (which it will, because the number of
lines are growing rapidly) I'll have to move back to C/C++ and start over.

But, yes, I was using routine_id the entire time.  I use a call_proc to read
what they are entering so that I can change which function they go to with
routine_id.  This way I can stop their input and wait for one specific
answer to my question (i.e. password) instead of allowing them to keep
typing any command (i.e.  who, look, etc.)

Michelle
----- Original Message -----
From: "Al Getz" <Xaxo at aol.com>
To: <EUforum at topica.com>
Sent: Friday, October 31, 2003 2:11 AM
Subject: RE: Declaring a Function Before it is used


>
>
> Hello Michelle,
>
> Hee hee, believe it or not, this subject comes up every time
> someone else with more then a casual interest in Eu 'joins' the
> list smile
> I think it's because they realize that there already is
> forward referencing but it's much harder to declare a
> function that will be forward referenced than a normal
> function.
>
> BTW, you did notice that there already is forward referencing
> didnt you?
>
> I use this all the time and so im quite used to it by now,
> but even an abbreviation 'rid' for 'routine_id' would
> be very nice to have.
>
> Take care,
> Al
>
> PS Dont ask any more questions ok?  (just kidding) smile
>
>
> Michelle Rogers wrote:
> >
> >
> > wow..I didn't realize that I could join this list and so quickly caues
> > such
> > a "stir" over a matter that I posted about.  heh..
> >
> > although, honestly, I imagine the reason that this is causing such
> > controversy is becaue this is the one major flaw that I can see that
> > Euphoria has.
> >
> > I think that was someone suggested (although I forgot who and I've
> > already
> > deleted by now) was a good idea...to add a statement near the top to say
> > whether you want this feature to be used in  your programming, or not.
> > That
> > way, at least everyone would have a choice.  That way, the ones who
> > wanted
> > to work on small programs could leave this off and wouldn't have a
> > problem.
> > But, those of us who wanted to make more complicated programs would be
> > able
> > to do it with this language, as well.  Otherwise, it looks like I  have
> > to
> > finish teaching myself C/C++ to be able to do some of the things I'm
> > going
> > to need to do.
> >
> > But, maybe that's logical? Maybe you have to sacrifice some of the power
> > (i.e forward referencing functions) when you use an easier language,
> > like
> > Euphoria?  When you think about that, it makes sense.  I guess we
> > shouldn't
> > be expecting to be able to do as much with an easier language.  Much
> > like...you can find editors that will create tables and t hings for you
> > in
> > HTML, that are easier than figuring out the code.  But, I never use
> > them,
> > because while, yes, they are easier...you have to only use what is
> > prewritten into them.  So, you can't have as much variation as when you
> > code
> > it out, yourself.  Maybe that's how we should be looking at this
> > instead.
> > If we don't expect as much from an easier language, like Euphoria, and
> > only
> > use it for "easier" programming tasks, then we won't be as disappointed
> > to
> > discover things that are beyond its capability, like forward referencing
> > structures.
> >
> >
> > ----- Original Message -----
> > From: "Pete Lomax" <petelomax at blueyonder.co.uk>
> > To: <EUforum at topica.com>
> > Sent: Thursday, October 30, 2003 9:30 PM
> > Subject: Re: Declaring a Function Before it is used
> >
> >
> > > On Thu, 30 Oct 2003 13:51:40 -0500, Robert Craig
> > > <rds at RapidEuphoria.com> wrote:
> > >
> > > >In practice, people would simply arrange their
> > > >routines in random order,
> > >
> > >
> > > TOPICA - Start your own email discussion group. FREE!
> > >
> > >
>
>
> TOPICA - Start your own email discussion group. FREE!
>
<snip>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu