> > > results in a type mismatch in return statement error. > > Shouldn't you be doing > Return (LWORD_VAL) 0 > > ?? > > After all the statement you tried to use is returning an integer, which i= s > why the error. I think you need to cast it to the type being returned by > the function. > > Hi Alan, thanks for the pointers. Casting the type as suggested produced Error [1152] scalar or void type expected for cast Error [1116] type mismatch in return statement So I tried changing the type of the function from LWORD_VAL to LWORD which compiles using return (LWORD) 0. So with several other type re-arrangements it now compiles nicely. I think I need to spend some time reading up on casting. Something I find so trivial in assembler proves to be almost impossible for me in c. Cheers Justin --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .