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

📄 scripting_5_2__formulas.html

📁 语音信号处理软件praat教程:这是一部入门教程
💻 HTML
字号:
<html><head><meta name="robots" content="index,follow">
<title>脚本 5.2. 算式</title></head><body bgcolor="#FFFFFF">

<table border=0 cellpadding=0 cellspacing=0><tr><td bgcolor="#CCCC00"><table border=4 cellpadding=9><tr><td align=middle bgcolor="#000000"><font face="Palatino,Times" size=6 color="#999900"><b>
脚本 5.2. 算式
</b></font></table></table>
<p>
可以在Praat脚本中使用数值表达式和字符串表达式。</p>
<h3>
数值表达式</h3>
<p>
在脚本中可以使用各种各样的<a href="Formulas.html">算式</a>:</p>
<code>&nbsp;&nbsp;&nbsp;
length = 10<br></code>
<code>&nbsp;&nbsp;&nbsp;
height = length/2<br></code>
<code>&nbsp;&nbsp;&nbsp;
area = length * height<br></code>
<p>
可以用数值变量和算式充当命令参数:</p>
<code>&nbsp;&nbsp;&nbsp;
Draw line... 0 length 0 length/2<br></code>
<p>
当然,除末尾之外的所有参数都必须加双引号括引后才能包含空格。也就是说,必须要么写成</p>
<code>&nbsp;&nbsp;&nbsp;
Draw line... 0 height*2 0 height<br></code>
<p>
要么写成</p>
<code>&nbsp;&nbsp;&nbsp;
Draw line... 0 "height * 2" 0 height<br></code>
<p>
数值表达式可以在赋值语句(如上)当中,以及在<b>if</b>、<b>elsif</b>、<b>while</b>、<b>until</b>和<b>for</b>(可能有两次)之后使用。</p>
<p>
有关如何从那些通常向Info(情报)窗口输出结果的命令那里获取信息,参看<a href="Scripting_6_4__Query_commands.html">脚本 6.4. 查询命令</a>。</p>
<h3>指向本页的链接</h3>
<ul>
<li><a href="Scripting.html">脚本</a>
<li><a href="Scripting_5__Language_elements.html">脚本 5. 语言元素</a>
</ul>
<hr>
<address>
	<p>&copy; ppgb, December 18, 2002</p>
	<p>&copy; 翻译:徐清白,2005年05月28日</p>
</address>
</body>
</html>

⌨️ 快捷键说明

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