- + Issue 901: (12) Section 3.2.1? - Coercion of strings to real allowed but not defined

[Jon Sanders, 1/22/2001]



  (12) Section 3.2.1? - Coercion of strings to real allowed but not defined
  
     module pureD;
     parameter real rparam = "string1";
     parameter integer iparam = "string2";
     parameter sparam = "string3";
     initial begin
     $strobe("String Value assigned to real: \n PCg= %g \n 
     PCf= %f \n PCna= ",rparam,rparam,,rparam );
     $strobe("String Value assigned to integer: \n PCs= %s 
     \n PCd= %d \n PCf= %f \n PCna= ",iparam,iparam,
     iparam,,iparam );
     $strobe("String Value assigned to sparam: \nPCs= %s \n 
     PCd= %d \n PCna= ",sparam,sparam,,sparam );
     end
     endmodule
      
   The above results in the following:
     String Value assigned to real:
     PCg= 1.76884e+09
     PCf= 1768843057.000000
     PCna= 1768843057
     String Value assigned to integer:
     PCs= ing2
     PCd= 1768843058
     PCf= 1768843058.000000
     PCna= 1768843058
     String Value assigned to sparam:
     PCs= string3
     PCd= 32497657065662259
     PCna= 32497657065662259
   The LRM implies that "string1" should be coerced to a real but does not describe how the coercion should be done. It makes a
   lot more sense that this would be an error. That would be far more useful for users. Similarly parameter integer iparam =
   "string2" should be an error.
      
     Recommendation: Someone must better define this or we should make illegal. Note, this is certainly specified in 1364 so we
     must also work this through with them.