Well... the following meets your condition for not
using collections or arrays...
<% for (int day = 1; day <= 31; day++) {
%>
<option <%if (day = selectedDay)
{%>selected<%}%>><%=day%></option>
<% } %>
Not using collections or arrays => more visually
complex.
Does "object creation" has that large an impact on
the server to warrant complex-looking codes ?
I feel that the above is visually more complex, and
more difficult to read, even if it does not use collections or arrays. Why is
there the contraint for "excessive object creation" on the server ? Why does it
"seem wrong" ? There is object creation, but I don't think they are "excessive"
as they function to help make readable code.
|
- [OS-webwork] Loop to create days John Patterson
- Re: [OS-webwork] Loop to create days Bernard Choi
- Re: [OS-webwork] Loop to create days John Patterson
- Re: [OS-webwork] Loop to create days Bernard Choi
- Re: [OS-webwork] Loop to create days Francisco Hernandez
- Re: [OS-webwork] Loop to create ... Bernard Choi
- Re: [OS-webwork] Loop to cre... Francisco Hernandez
- Re: [OS-webwork] Loop to create ... John Patterson
- Re: [OS-webwork] Loop to cre... Anders Engström
- Re: [OS-webwork] Loop to... John Patterson
- Re: [OS-webwork] Loop to... Pat Lightbody
- Re: [OS-webwork] Loop to create days Patrick Lightbody
- RE: [OS-webwork] Loop to create days Jason Carreira