Delphi的语法问题 - Delphi / 语言基础/算法/系统设计
例子程序见附件,用Delphi 7进行编译
问题代码为
Delphi(Pascal) code:
if Node.ChildNodes <> nil then
begin
for i := 0 to Node.ChildNodes.Count - 1 do
begin
cNode := Node.ChildNodes.Get(i);
shapetype := cNode.NodeName;
if (shapeType = 'line') then
begin
shape := TLine.Create;
shape.ShapeType := shapetype;
shape.Name := cNode.AttributeNodes.Nodes['name'].NodeValue;
TLine(shape).X1 := cNode.AttributeNodes.Nodes['x1'].NodeValue;
TLine(shape).Y1 := cNode.AttributeNodes.Nodes['y1'].NodeValue;
TLine(shape).X2 := cNode.AttributeNodes.Nodes['x2'].NodeValue;
TLine(shape).Y2 := cNode.AttributeNodes.Nodes['y2'].NodeValue;
try
TLine(shape).Color := StringToColor(cNode.AttributeNodes.Nodes['color'].NodeValue);
except
TLine(shape).Color := ClBlue;
end;
end
else if (shapeType = 'rectangle') then
begin
shape := TRectangle.Create;
shape.ShapeType := shapetype;
shape.Name := cNode.AttributeNodes.Nodes['name'].NodeValue;
TRectangle(shape).X1 := cNode.AttributeNodes.Nodes['x1'].NodeValue;
TRectangle(shape).Y1 := cNode.AttributeNodes.Nodes['y1'].NodeValue;
TRectangle(shape).X2 := cNode.AttributeNodes.Nodes['x2'].NodeValue;
相关问答:
返回的内容是如下代码,怎么能渠道2b?
<p class="text1">1a </p>
<p class="text1">2b </p>
<p class="text1">3c </p>
<p cl ......
select * from shuju.DB where 开盘价-收盘价<=0.02
开盘价 与收盘价 是数据库里的字段
select * from aTableName where ((开盘价-收盘价) <=0.02 )
开盘价比收盘价低两分以下的情况
Mark!!!!!!
se ......
问大家个问题:
现在有一个现成的程序,是visual foxpro做的,数据库是dbf文件,我没有用过foxpro,开始都没找到数据库,终于看明白原来dbf就是数据库,(但这个程序好多个dbf啊!还没安装foxpro,没打开这些数据库 ......
各位好!!
假设我有两个text文件
一个名叫 1.text
内容:
I like PC....
另外一是2.text
内容:
function yk as string
endfunction
globals
endglobals
***********************分界线********** ......