嗨,我在使用for循環創建一些圖表時遇到問題。我有一個單詞列表,我希望從數據表中選擇它們並將其拉成grpah。我想用不同的詞語多次完成這件事。到目前為止,我已經包含了我的內容,但是我的for循環只會執行列表中的第一個單詞。
如果循環那裡也有al as na,因為我只想在有大量匹配的數量的情況下構建圖形。
graph = {"abc", "123"};
n_g = N Items( graph );
For( i = 1, i <= n_g, i++,
dt << Select Where( Contains( :Column, graph[i] ) );
num = N Rows( dt << get selected rows );
If( num > 0,
mess = Char( num ) || " from" || Char( graph[i] );
dt << Subset(
Output table name( " from " || Char( graph[i] ) ),
Selected Row( 1 ),
Selected Column( 0 )
);
biv = Graph Builder(
Size( 1300, 1100 ),
Show Control Panel( 0 ),
Variables( X( :Slack ), Y( :Comb ) ),
Elements( Points( X, Y, Legend( 4 ) ) ),
SendToReport(
Dispatch( {}, "Slack", ScaleBox, {Add Ref Line( 0, "Dashed", "Medium Dark Red", "", 4 )} ),
Dispatch( {}, "Comb", ScaleBox, {Add Ref Line( 25, "Dashed", "Medium Light Yellow", "", 4 )} ),
Dispatch(
{},
"Graph Builder",
FrameBox,
{Add Text Annotation( Text( mess ), Text Box( {8, 14, 251, 34} ) )}
)
)
);
jrn << Append(
Outline Box( "from " || Char( graph[i] ),
Text Box( "There are" || Char( n_g ), Markup( 1 ) ),
m << New Data Box(),
biv << Report
)
);
,
jrn << Append(
Outline Box( " from " || Char( graph[i] ),
Text Box( "There are no paths that begin with " || Char( graph[i] ), Markup( 1 ) )
)
);
);
dt << Clear Select();
);
子集的正確語法是
dt << Subset(
Output table name( " from " || Char( graph[i] ) ),
Selected Rows( 1 ),
Selected Columns( 0 )
);
此外,我沒有看到您要附加的日記代碼。 我假設,
jrn << Append(
Outline Box( "from " || Char( graph[i] ),
Text Box( "There are" || Char( n_g ), Markup( 1 ) ),
m << New Data Box(),
biv << Report
)
);<BR />
jrn引用位於代碼中的某個位置,並且不包含在此snipet中。