Am I doing it wrong?

Torarin torarind at gmail.com
Sun Oct 3 04:20:09 PDT 2010


2010/10/3 Emil Madsen <sovende at gmail.com>:
> Well the result is assigned to an immutable int, shouldn't that be a compile
> const too?

Immutable means that the variable, or the memory it points to, will
not change. You can still assign run-time values to it:
void main(string[] args)
{
  immutable string a = args[0];
  writeln(a);
}


More information about the Digitalmars-d mailing list