How to use a forward function declaration in a program ?
|
12-21-2013, 09:19 PM
Post: #1
|
|||
|
|||
How to use a forward function declaration in a program ?
I know this must be obvious can't figure it out. I have a subroutine called by a main program that I want to move to the end of the end of the main program as follows:
EXPORT Sub1; EXPORT Main_prog Begin Sub1; End; Sub1 Begin End; I'm getting a syntax error just before the Begin after the Sub1. What am I doing wrong? |
|||
12-21-2013, 09:54 PM
Post: #2
|
|||
|
|||
RE: How to use a forward function declaration in a program ?
First export isn't necessary, but "()" is needed otherwise is a variable.
Code: Sub1(); My website: ried.cl |
|||
12-21-2013, 10:01 PM
(This post was last modified: 12-21-2013 10:04 PM by Michael de Estrada.)
Post: #3
|
|||
|
|||
RE: How to use a forward function declaration in a program ?
That doesn't work either. Now I get a syntax error after the ) on the first line.
Edit, it does work w/o the EXPORT, but gives the syntax error with the EXPORT. |
|||
12-21-2013, 10:05 PM
Post: #4
|
|||
|
|||
RE: How to use a forward function declaration in a program ?
I would try:
Code: Sub1(); Code: EXPORT Sub1(); Code: Sub1() Patrice “Everything should be made as simple as possible, but no simpler.” Albert Einstein |
|||
12-21-2013, 10:11 PM
Post: #5
|
|||
|
|||
RE: How to use a forward function declaration in a program ?
This works, thanks guys:
PHP Code: Sub1(); |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)