variable type cast

Jay Michael <[email protected]>
Newsgroups gmane.comp.compilers.gpc
Message-ID <[email protected]>
gpc version 20070904, based on gcc-3.4.5 (mingw special)
 
     Given
          type INT16  = INTEGER  attribute( size=16 ) ;
          type WORD16 = Cardinal attribute( size=16 ) ;
          var i16 : INT16 ;
          var w16 : WORD16 ;
why does
          WORD16(I16) := W16 ;
produce "error: invalid lvalue in assignment"?

 
         

_______________________________________________
Gpc mailing list
[email protected]
https://www.g-n-u.de/mailman/listinfo/gpc
jsm5.pas (text/plain, 242 B)
program jsm5( input, output ) ;
type
  INT16  = INTEGER  attribute( size=16 ) ;
  WORD16 = Cardinal attribute( size=16 ) ;
var
  i16 : INT16 ;
  w16 : WORD16 ;
begin
WORD16(I16) := W16 ; { error: invalid lvalue in assignment }
end.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.