Re: Why is type for string parameters mandatory?

From: Geoffrey.Coram <Geoffrey.Coram_at_.....>
Date: Thu Nov 16 2006 - 03:49:56 PST
Marq Kole wrote:
> 
> Geoffrey,
> 
> > things like
> >   if (myParam == "nmos")
> > since both sides would be (converted from string literal to)
> > the same 24-bit integer value.
> 
> I would say that the string "nmos" would be converted to a 32-bit integer value.

Sorry, yes, "nmos" would be 32 bits.  myParam would be some number of
bits, depending on the final value assigned: 24 if the default "abc"
was left, but more or less if longer or shorter strings were assigned,
and then either side might need to be zero-extended, as Shalom suggested.

-Geoffrey
Received on Thu Nov 16 03:50:01 2006

This archive was generated by hypermail 2.1.8 : Thu Nov 16 2006 - 03:50:23 PST