I am unclear as to how the following does not produce any results as display tmp_buff.ln tmp_buff.name does not show the results:
def var i as int.
def temp-table tmp
field ln as int
field name as char.
def buffer tmp_buff for tmp.
create tmp.
assign tmp.ln = 1
tmp.name = "one".
create tmp.
assign tmp.ln = 2
tmp.name = "two".
create tmp.
assign tmp.ln = 3
tmp.name = "three".
create tmp.
assign tmp.ln = 4
tmp.name = "four".
create tmp.
assign tmp.ln = 5
tmp.name = "five".
for each tmp:
i = tmp.ln.
do while avail tmp_buff:
message "in avail loop". pause.
i = i + 1.
for first tmp_buff where tmp_buff.ln = i:
display tmp_buff.ln tmp_buff.name.
end. /* for each */
end. /* do while */
end. /* for each tmp */
def var i as int.
def temp-table tmp
field ln as int
field name as char.
def buffer tmp_buff for tmp.
create tmp.
assign tmp.ln = 1
tmp.name = "one".
create tmp.
assign tmp.ln = 2
tmp.name = "two".
create tmp.
assign tmp.ln = 3
tmp.name = "three".
create tmp.
assign tmp.ln = 4
tmp.name = "four".
create tmp.
assign tmp.ln = 5
tmp.name = "five".
for each tmp:
i = tmp.ln.
do while avail tmp_buff:
message "in avail loop". pause.
i = i + 1.
for first tmp_buff where tmp_buff.ln = i:
display tmp_buff.ln tmp_buff.name.
end. /* for each */
end. /* do while */
end. /* for each tmp */