Functions - newbie

General discussion on mikroC.
Post Reply
Author
Message
royhopkins
Posts: 6
Joined: 30 Jul 2005 01:56

Functions - newbie

#1 Post by royhopkins » 04 Aug 2005 10:06

I am converting some assembler code to mikroC but there are several subroutines that call othere subroutines from within them.

But it appears that when I create a function that is called from "main" this function can not then call another function. :(

Or is there a different way of creating subroutines that can call of subroutines in C :?:

gambrose
Posts: 369
Joined: 28 Sep 2004 17:34
Location: uk

#2 Post by gambrose » 04 Aug 2005 10:11

i think what you are having trouble with is that the function you are calling is not defined at the time you call it.

at the top of you file copy the function prototypes but end them with a ; not the usual braces {}
Graham Ambrose

royhopkins
Posts: 6
Joined: 30 Jul 2005 01:56

Thanks

#3 Post by royhopkins » 05 Aug 2005 09:55

Thanks that sorted my problem out :D

Post Reply

Return to “mikroC General”