PROGRAM   ValHex ;
VAR
   G_MyString  : String ;
   G_MyLongint : Longint ;
   G_ErrCode   : Integer ;
BEGIN
   G_MyString := '$FFFF' ;

   Val ( G_MyString , G_MyLongint , G_ErrCode );

   WriteLn (   G_ErrCode  ,  '   '  ,  G_MyLongint   );
END.
