[M3devel] initializing field with record size?

Jay K jay.krell at cornell.edu
Sun Apr 4 12:02:09 CEST 2010


TYPE
  struct_stat = RECORD
    type_size: LONGINT := VAL(BYTESIZE(struct_stat), LONGINT);
    st_dev   : LONGINT; (* Utypes.dev_t   *)
...

  END;


new source -> compiling Ustat.i3
"..\src\unix\Common\Ustat.i3", line 57: illegal recursive declaration (struct_stat)
"..\src\unix\Common\Ustat.i3", line 57: illegal recursive type declaration
2 errors encountered
compilation failed => not building library "m3core.lib"
Fatal Error: package build failed

 

really can't be allowed?

 

I know, I can compute it myself, or I can make it a default parameter to functions that traffic in the type.

 

 

 - Jay
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20100404/800843f2/attachment-0001.html>


More information about the M3devel mailing list