Questão
ID 1218497Disciplina: Tecnologia da Informação
Assunto: Delphi
Ano: 2008 Banca: CESPE CEBRASPE - Centro de Seleção e de Promoção de Eventos UnB Órgão: Superior Tribunal de Justiça
procedure TWinForm.Button1_Click(sender: System.Object; e: System.EventArgs);
var
str_filename : string;
objTxtRd : XmlTextReader;
begin
OpenFileDialog1.ShowDialog();
str_filename := OpenFileDialog1.FileName;
ListBox1.Items.Clear;
objTxtRd := XmlTextReader.Create (str_filename);
while objTxtRd.Read do
begin
case objTxtRd.NodeType of XMLNodeType.Text:ListBox1.Items.Add(objTxtRd.Value);
XMLNodeType.Whitespace:ListBox1.Items.Add(objTxtRd.NodeType);
else
listBox1.Items.Add(objTxtRd.Name + ' is type ' + System.Convert.ToString(objTxtRd.NodeType));
end;
end;
end;
Considerando o trecho de código acima, escrito em linguagem Delphi, versão 8, julgue os itens que se seguem.
A instrução str_filename : string; está sintaticamente correta na linguagem Delphi 8.