"Topica scrambled" (was: Declaring a Function Before it is used)

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

This is a multi-part message in MIME format.
--------------CA3D3D3960FE603E3554BB21

Why was this e-mail scrambled? (append original as GIF)=20

-------- Original Message --------
Subject: Re: Declaring a Function Before it is used
Date: Fri, 31 Oct 2003 16:47:38 +0100
From: Rolf Schr=F6der <rolf at rschr.de>
To: EUforum at topica.com
References: <446503972-1463792126-1067513466 at boing.topica.com>
<169517433-1463747838-1067519202 at boing.topica.com>
<885623925-1463792638-1067539964 at boing.topica.com>
<1393418220-1463792638-1067613667 at boing.topica.com>

Mike Nelson wrote:
> ...=20
> In Eu, I must code this as
>=20
> procedure bar()
> -- do highly technical stuff
> end procedure
>=20
> global procedure foo()
> -- do stuff
> bar()
> -- do more stuff
> end procedure
>=20
> Admittedly on reading foo, I have already read bar and "know what it does=
".
> On the other hand, as likely as not I can't really understand what bar do=
es
> until I see it in its context in foo.  If forward referencing were allowe=
d,
> I would put the general routine foo first and the implementation routine
> bar()  after it.
> ...

Mike, would it be possible to write your example code like this:


global procedure foo()
-- do stuff
bar()
-- do more stuff
end procedure

So, you have not (or would not) read bar() in advance of foo().

Have a nice day, Rolf=20


| Earth          |-------------------------------|
| Solar System   | Earth Phone : +49-40-724-4650 |
| Milky Way      | National Fax: 0721-151-577722 |
| Local Group    | mailto:Rolf at RSchr.de          |
| Known Universe | http://www.rschr.de           |
Content-Disposition: inline;
 filename=3D"Topica.txt"

Mike Nelson wrote:
> ...=20
> In Eu, I must code this as
>=20
> procedure bar()
> -- do highly technical stuff
> end procedure
>=20
> global procedure foo()
> -- do stuff
> bar()
> -- do more stuff
> end procedure
>=20
> Admittedly on reading foo, I have already read bar and "know what it does=
".
> On the other hand, as likely as not I can't really understand what bar do=
es
> until I see it in its context in foo.  If forward referencing were allowe=
d,
> I would put the general routine foo first and the implementation routine
> bar()  after it.
> ...

Mike, would it be possible to write your example code like this:


global procedure foo()
-- do stuff
bar()
-- do more stuff
end procedure

So, you have not (or would not) read bar() in advance of foo().

Have a nice day, Rolf=20


| Earth          |-------------------------------|
| Solar System   | Earth Phone : +49-40-724-4650 |
| Milky Way      | National Fax: 0721-151-577722 |
| Local Group    | mailto:Rolf at RSchr.de          |
| Known Universe | http://www.rschr.de           |

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

Search



Quick Links

User menu

Not signed in.

Misc Menu