I actually prefer to never use call and never use declare. In this way the flow of my program always goes upwards. It's seems easier to me so I can follow my code flow. When you use the declares it does make it a bit easier as you don't need to worry about routine order placement though as Tom mentioned.
------------------
George W. Bleck
Senior System Engineer
KeySpan Corporation
[This message has been edited by George Bleck (edited September 25, 2000).]
Announcement
Collapse
No announcement yet.
Call Sub error
Collapse
X
-
You can avoid the need to use any particular order by using DECLAREs for each sub and function. The DECLAREs go at the top of your program, where they can tell the compiler what to expect of each sub and function in advance of their actual definition.
It is clear to the compiler that you are calling a sub when you use CALL, so the DECLAREs aren't needed. By the same token, however, the compiler will not be as good at catching your programming errors when you use CALL.
------------------
Tom Hanlin
PowerBASIC Staff
Leave a comment:
-
Call Sub error
When i make use of option explicit, i need to have the procedures i use in the correct order.
However, when i place CALL before the procedure PB doesn't check it no longer.
I.o.w. he does no longer care if the procedure exists or not.
??
------------------
[email protected]Tags: None
Leave a comment: