root/doc/manual_html/Step-count.html

/* [<][>][^][v][top][bottom][index][help] */
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Copyright (C) 2010-2023 j8takagi -->
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Step count (YACASL2 - CASL II 処理システム)</title>

<meta name="description" content="Step count (YACASL2 - CASL II 処理システム)">
<meta name="keywords" content="Step count (YACASL2 - CASL II 処理システム)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<link href="index.html" rel="start" title="Top">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Register-and-memory.html" rel="up" title="Register and memory">
<link href="Only-assemble.html" rel="next" title="Only assemble">
<link href="End-value.html" rel="prev" title="End value">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>
<link rel="stylesheet" type="text/css" href="style.css">


</head>

<body lang="ja_JP">
<span id="Step-count"></span><div class="header">
<p>
Previous: <a href="End-value.html" accesskey="p" rel="prev">End value</a>, Up: <a href="Register-and-memory.html" accesskey="u" rel="up">Register and memory</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
</div>
<hr>
<span id="puroguramunosutetupuShu-woBiao-Shi"></span><h4 class="subsection">2.3.3 プログラムのステップ数を表示</h4>

<p><code>grep</code>と<code>wc</code>を組み合わせれば、プログラムのステップ数を表示できます。
</p>
<div class="example">
<pre class="example">$ <kbd>casl2 -t hello.casl | grep 'GR1:' | wc -l</kbd>
11
</pre></div>

<div class="example">
<pre class="example">$ <kbd>casl2 -t addl.casl | grep 'GR1:' | wc -l</kbd>
3
</pre></div>

<p><samp>sum_10.casl</samp>はプログラム内にループがあるため、ステップ数が大きくなります。
</p>
<div class="example">
<pre class="example">$ <kbd>casl2 -t sum_10.casl | grep 'GR2:' | wc -l</kbd>
53
</pre></div>




</body>
</html>

/* [<][>][^][v][top][bottom][index][help] */