I'm getting this BCC error message when I compile a .GOC file:
Error ROUTINE1.GOC 272: Expression syntax in function PasteCommon
Here is the offending line of code:
*vmBlock_p = @call textOD_p::MSG_VIS_TEXT_CREATE_TRANSFER_FORMAT(
NullHandle, scrapFile_p,
0, TEXT_ADDRESS_PAST_END, 0 );
If I put everything on it's own line, the error occurs on the line with the
NullHandle. Why this is bad I don't know, since I use it all the time in the
other source files. I use it only once in this source file, but I don't think
that makes a difference. If I replace the NullHandle with a 0, I still get the
error.
Here is the whole function, for reference:
ClipboardQuickNotifyFlags
PasteCommon( ClipboardItemFlags transferFlags_p,
/* From which item should we paste, quick or normal? */
optr textOD_p,
/* Text object to paste to. */
VMFileHandle scrapFile_p,
/* Scrapbook document. */
VMBlockHandle * vmBlock_p )
/* VM block of new item. */
{
/* Info on the indicated transfer item returned here. */
ClipboardQueryArgs query;
/* Address of requested format returned here */
ClipboardRequestArgs request;
/* Return value after pasting. */
ClipboardQuickNotifyFlags retVal;
/* Used to dirty copied block. */
MemHandle memBlock;
/*
* First, find out if the indicated clipboard item
* (normal or quick-transfer) supports our TEXT_FORMAT.
*/
ClipboardQueryItem( transferFlags_p, &query );
if ( query.CQA_numFormats ) {
if ( ClipboardTestItemFormat( query.CQA_header, TEXT_FORMAT ) ) {
/*
* A clipboard item exists and does support CIF_TEXT,
* let's get it. Fetch the file/block handle of transfer
* format GEOWORKS::CIF_TEXT
*/
ClipboardRequestItemFormat( TEXT_FORMAT, query.CQA_header,
&request );
/*
* Tell text object to replace all its text (from
* position 0 to position TEXT_ADDRESS_PAST_END) with
* the transfer format we got back from
* ClipboardRequestItemFormat.
*/
@call textOD_p::MSG_VIS_TEXT_REPLACE_WITH_TEXT_TRANSFER_FORMAT(
VMCHAIN_GET_VM_BLOCK( request.CRA_data ),
request.CRA_file,
0, TEXT_ADDRESS_PAST_END, 0 );
/*
* Duplicate the clipboard item and add to scrapbook.
*/
*vmBlock_p = @call textOD_p::MSG_VIS_TEXT_CREATE_TRANSFER_FORMAT(
NullHandle, scrapFile_p,
0, TEXT_ADDRESS_PAST_END, 0 );
VMLock( scrapFile_p, *vmBlock_p, &memBlock );
VMDirty( memBlock );
VMUnlock( memBlock );
SendSelectNotify( TRUE );
retVal = CQNF_COPY;
}
else { /* Not in TEXT_FORMAT. */
retVal = CQNF_NO_OPERATION;
}
}
else { /* No transfer items on clipboard. */
retVal = CQNF_NO_OPERATION;
}
ClipboardDoneWithItem( query.CQA_header );
return( retVal );
} /* PasteCommon */
Anyone have any ideas?
Nathan