Re: Those of us who are C'ly challenged :>

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

Nate Brooman wrote:
>
> Well, one reason Euphoria/Win32 is so weakly developed is because Eu32
> f***ks up the screen.
>
> One main reason why I think that C is better then Eu is that you can declare
> stuff below the initial procedure. I.E.:
>
> int main()
> {
> printf("Hello\n");
> goaway();
> }
>
> goaway()
> {
> printf("\nGo away now!\n");
> }
>
> and it's bound to work. But I get errors in Eu by typing:
>
> procedure hello()
>
>   clear_screen()
>   puts(1,"Hello!\n")
>   goaway()
> end procedure
>
> procedure goaway()
>
>   puts(1,"\nGo away now!\n")
>
> end procedure
>
> You know why it does this David? I can structurize Eu, but not like the
> previous example (why is this Rob?)
>
> - Nate Brooman
> [nateb at log.on.ca]
>

Defining functions before they are called is one of the things that
separates structured langueges from unstructured - like BASIC.
Your example is called "forward declaration" and is generally
discouraged as sloppy
programming. It's normally reserved for use when there is no
alternative, or when
your CS grades are too high.

Irv

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

Search



Quick Links

User menu

Not signed in.

Misc Menu