Article # 676, added by Geoworks, historical record
| first | previous | index | next | last |

Casting the return value from an @call.



Q. Error MYSOURCE.GOC 213: parse error, expecting ':'

      theAnswer = @call (int) (self::
          MSG_GEN_GUP_CALL_OBJECT_OF_CLASS( theMessage ) );

   I've tried various ways of casting the message but they all come up
   with errors (usually this one).

A. You need to move the "(int)" before the @call like this:

      theAnswer = (int) @call (self::
          MSG_GEN_GUP_CALL_OBJECT_OF_CLASS( theMessage ) );