11738.html

来自「VB技巧问答10000例 VB技巧问答10000例」· HTML 代码 · 共 23 行

HTML
23
字号
<html>
  <head>
    <title>Re: 如何依序排列</title>
  </head>
  <body bgcolor="#FFFFFF" vlink="#808080">
    <center>
      <h1>Re: 如何依序排列</h1>
    </center>
<hr size=7 width=75%>

<hr size=7 width=75%><p>
Posted by <a href="mailto:jendar@ms4.url.com.tw">dar</a> on April 07, 1999 at 18:14:11:<p>
In Reply to: <a href="11566.html">如何依序排列</a> posted by 小祥 on March 31, 1999 at 21:44:40:<p>
dim a(10000) as string<br>dim i as integer<br>dim j as integer<br>dim k as integer<br>dim s as string<p>i=0<br>open "abc.txt" for input as #1<br>while not eof(1)<br>line input #1,a(i)<br>i=i+1<br>wend<br>close #1<br>i=i-1<br>for j=0 to i-1<br>for k=j+1 to i<br>if a(j)>a(k) then<br>s=a(j)<br>a(j)=a(k)<br>a(k)=s<br>endif<br>next k<br>next j<br>open "def.txt" for output as #2<br>for j=0 to i<br>print #2,a(j)<br>next j<br>close #2<br>
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 11738-->
</ul><!--end: 11738-->
<br><hr size=7 width=75%><p>

</body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?