A tuff question about strings

John Collins jmc at root44.UUCP
Wed Aug 17 19:48:13 AEST 1983

Personally, I think that constants in a program ought to be exactly that,
and not something which might be what they look like the first time through,
and something else the next time.  There is an old chestnut about assigning
to a Fortran argument which has been passed as a constant.  Some languages
(e.g. BCPL, and (in a different sense) COBOL) allow you to change 'goto's
whilst the program is running to make them 'goto' somewhere else. UGH!!

However K&R p181 says that strings are 'storage class static'.  I suppose
that does decide the issue.  I think we do need a syntax for 'readonly'
storage classes, both for strings and external/static stuff so we can stop
patching assembler output, however that subject has already been aired
rather a lot...

		John Collins

More information about the Comp.lang.c mailing list