Manifest array with NATURAL_xx

6 views
Skip to first unread message

jjj

unread,
May 26, 2020, 12:07:21 AM5/26/20
to Eiffel Users

Result := {ARRAY [like Current]} <<0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000>>

where Current is a NATURAL_32_REF, will not compile.  The compiler says, VWMA error, non-conforming manifest array.  Manifest array element at index 1 has type INTEGER_32 incompatible with declared element type like Current.

Is there a way around this other than using `as_natural_xx' as shown below?  It's ugly.

Result := {ARRAY [like Current]} <<(0x2).as_natural_32, (0xC).as_natural_32,
(0xF0).as_natural_32, (0xFF00).as_natural_32,
(0xFFFF0000).as_natural_32>>

thanks,
jjj

Alexander Kogtenkov

unread,
May 26, 2020, 2:11:55 AM5/26/20
to eiffel...@googlegroups.com
As of now, other possible solutions include
 
   {ARRAY [NATURAL_32]} <<0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000>>
   {ARRAY [NATURAL_32_REF]} <<{NATURAL_32} 0x2, {NATURAL_32} 0xC, {NATURAL_32} 0xF0, {NATURAL_32} 0xFF00, {NATURAL_32} 0xFFFF0000>>
 
Alexander Kogtenkov
 
 
jjj <jjj...@uky.edu>:
Reply all
Reply to author
Forward
0 new messages