> void DBManualEntry()
> {
> Err er;
> UInt16 position=13;
> //position+=11;
>
> MemHandle vh=MemHandleNew(3);
> MemPtr npos = MemHandleLock(vh);
>
> ListBoxStrType *payments = MemPtrNew(sizeof(ListBoxStrType));
> <snip>
>
> }
>
> If I let "position+=11;" compile, I will get an Expression Syntax
> Error on the next line "MemHandle vh..."

Just a guess, but are you compiling a C++ file, or straight C?  C++ will let
you get away with what you're doing there, but C won't.  C needs to see all
declarations of variables before any executable code in a given function.

The following should compile even under a C compiler:

void DBManualEntry()
{
Err er;
UInt16 position=13;
MemHandle vh;
MemPtr npos;
ListBoxStrType *payments;

position+=11;

vh=MemHandleNew(3);
npos = MemHandleLock(vh);
payments = MemPtrNew(sizeof(ListBoxStrType));
<etc.>
}


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to