Ich erhalte einen Fehler unknown identifier 'start'
Fehler beim Versuch, ein Array in Eiffel zu durchqueren
meinen Code:
visit_table(table: ETABLE)
local
t_array: ARRAY[ARRAY[ELEMENT]]
b_header: BOOLEAN
row_index: INTEGER
do
t_array := table.t_array
b_header := table.b_header
table.content := "<table>"
row_index := 0
from t_array.start
until t_array.off
loop
table.content := table.content + "<tr>"
from t_array.item.start
until t_array.item.off
loop
if row_index = 0 and b_header = TRUE then
table.content := table.content + "<th>" + t_array.item.content + "</th>"
else
table.content := table.content + "<td>" + t_array.item.content + "</td>"
end
end
table.content := table.content + "</tr>"
row_index := row_index + 1
end
table.content := table.content + "</table>"
end
Ich mag nur durch die Objekte des 2D-Arrays analysieren und HTML-Tags um sie herum wickeln.
Stimmt etwas mit meiner Syntax nicht?
Vielen Dank für die Antwort die zweite Option funktionierte wie ein Charme. –