CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Internal Error - Contact CCS - Function Pointers

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
mradrenalin



Joined: 15 Jun 2009
Posts: 2

View user's profile Send private message

Internal Error - Contact CCS - Function Pointers
PostPosted: Tue Jun 16, 2009 12:27 am     Reply with quote

I get this error

Line 23(1,1) Internal Error - Contact CCS LABEL SCR=686

error flashes for curly bracket after "void main()"


Code:

#include <18F4550.H>
#fuses NOWDT, NOPROTECT, NOPUT
#use delay(clock = 25000000)
#include "flex_lcd.c"
#build(reset=0x800)
#build(interrupt=0x808)
#org 0x0000,0x07ff
void bootloader()
{
#asm nop
#endasm
}

void text0(void);
void text1(void);

typedef int (*intfptr)();

intfptr func[2] = {text0,text1};

void main()
{
lcd_init();


while(1);
}

void text0()
{
lcd_putc("text0");
}
int text1(int a)
{
lcd_putc("text1");
}
Ttelmah
Guest







PostPosted: Tue Jun 16, 2009 2:22 am     Reply with quote

As I said, when I posted the typedef you are using, _CCS, does not support initialisation of function pointers, in the declaration_.....

Best Wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group