⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 a_6.1.htm

📁 建立《编译原理网络课程》的目的不仅使学生掌握构造编译程序的原理和技术
💻 HTM
字号:
<html>
<head>
<title>6.1的解答</title>
</head>
<body background="../../images/background.gif">
<center><font class="title2"><b>练习6.1</b></font></center><br>
<p>解答:</p>
<p>在下面的程序中,a和b的每一次出现处的下标和所应用的说明的下标一致:</p>
<p>
        &nbsp;&nbsp;&nbsp; <font size="4">program a<b><sub>1</sub></b>(input,output); <br>       
        &nbsp;&nbsp;&nbsp; procedure b<b><sub>1</sub></b>(u,v,x,y: integer); <br>        
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;var a<sub><b>2</b></sub>: record a<sub><b>3</b></sub>,b<sub><b>2</b></sub>: integer 
end; <br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; b<sub><b>3</b></sub>: record b<sub><b>4</b></sub>,a<sub><b>4</b></sub>:         
        integer end; <br>       
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;begin <br>       
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;with a<sub><b>2</b></sub> do begin         
        a<sub><b>3</b></sub>:=u;b<sub><b>2</b></sub>:=v end; <br>       
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;with b<sub><b>3</b></sub> do begin         
        a<sub><b>4</b></sub>:=x; b<sub><b>4</b></sub>:=y end; <br>       
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writeln(a<sub><b>2</b></sub>. a<sub><b>3</b></sub>,a<sub><b>2</b></sub>.         
        b<sub><b>2</b></sub>,b<sub><b>3</b></sub>.a<sub><b>4</b></sub>,b<sub><b>3</b></sub>.b<sub><b>4</b></sub>) <br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;end; <br>       
        &nbsp;&nbsp;&nbsp; begin <br>       
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;b<b><sub>1</sub></b>(1,2,3.4) <br>       
        &nbsp;&nbsp;&nbsp; end.</font></p>
</body>

<html><script language="JavaScript">

⌨️ 快捷键说明

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