Re: Initializing variables on declarations
- Posted by Jason Gade <jaygade at yahoo.com> Apr 04, 2007
- 591 views
Most of the examples show a constant assigned in initialization on declaration. Would it complicate matters to make it the rule that only constants or constant expressions are allowed? Legal:
integer x = 5 atom y = 3.1415927 * 8 * 8 sequence foo = {65, 66, "C"}
Illegal:
integer y = x + 320 * v sequence foo = {bar, baz, zoo}
Of course then you get to the point whether the identifier of a constant could be used... Just musing here. -- "Any programming problem can be solved by adding a level of indirection." --anonymous "Any performance problem can be solved by removing a level of indirection." --M. Haertel "Premature optimization is the root of all evil in programming." --C.A.R. Hoare j.