Using reserved keywords as identifiers(2019-03-23 14:39:35)

Using reserved keywords as identifiersの編集履歴一覧へ戻る

2019-03-23 14:39:35更新でのソースとプレビューを表示しています。


プレビューを確認する


ソース

<ul>
	<li>
	<h1>Using reserved keywords as identifiers</h1>
	</li>
</ul>

<p><span class="tlid-translation translation"><span>個人クラスでGambasの予約名でもあるプロパティ名を使用するには、プロパティ名を { } で囲む必要があります。</span></span></p>

<div class="uk-overflow-container">
<table class="table uk-table">
	<tbody>
		<tr>
			<th>
			<p>Will both cause a compile error</p>
			</th>
			<th>Will not</th>
		</tr>
		<tr>
			<td><code style="">Property Font As Font</code></td>
			<td><code style="">Property {Font} As Font</code></td>
		</tr>
		<tr>
			<td><code style="">Property Left As Integer</code></td>
			<td><code style="">Property {Left} as Integer</code></td>
		</tr>
	</tbody>
</table>
</div>

<p><span class="tlid-translation translation"><span>したがって、コンパイラは、シンボルを予約済みキーワードとして解釈しないようにします。これにより、任意のシンボルを識別子として使用できます。</span></span></p>

<p>&nbsp;</p>

<div class="uk-overflow-container">
<table class="uk-table">
	<tbody>
		<tr>
			<td class="uk-text-center"><img src="https://img.wiki3.jp/Basicsoft/info.gif" /></td>
			<td><span class="tlid-translation translation"><span>この構文は、メソッドの宣言、定数の宣言、イベントの宣言、引数などに使用できます。識別子が受け入れられるところならどこでも。</span></span></td>
		</tr>
	</tbody>
</table>
</div>

<h3>See also</h3>

<div>
<div class="seealso">
<ul>
	<li>
	<p><a href="http://gambaswiki.org/wiki/lang/arraydecl">Array Declaration</a></p>
	</li>
	<li>
	<p><a href="http://gambaswiki.org/wiki/lang/constdecl">Constant Declaration</a></p>
	</li>
	<li>
	<p><a href="http://gambaswiki.org/wiki/lang/eventdecl">Events declaration</a></p>
	</li>
	<li>
	<p><a href="http://gambaswiki.org/wiki/lang/localdecl">Local Variable Declaration</a></p>
	</li>
	<li>
	<p><a href="http://gambaswiki.org/wiki/lang/methoddecl">Method Declaration</a></p>
	</li>
	<li>
	<p><a href="http://gambaswiki.org/wiki/lang/vardecl">Variable Declaration</a></p>
	</li>
</ul>
</div>
</div>

<p>&nbsp;</p>

<div>&nbsp;</div>
}

プレビュー

  • Using reserved keywords as identifiers

個人クラスでGambasの予約名でもあるプロパティ名を使用するには、プロパティ名を { } で囲む必要があります。

Will both cause a compile error

Will not
Property Font As Font Property {Font} As Font
Property Left As Integer Property {Left} as Integer

したがって、コンパイラは、シンボルを予約済みキーワードとして解釈しないようにします。これにより、任意のシンボルを識別子として使用できます。

 

この構文は、メソッドの宣言、定数の宣言、イベントの宣言、引数などに使用できます。識別子が受け入れられるところならどこでも。

See also

 

 

ソースを確認する


Using reserved keywords as identifiersの編集履歴一覧へ戻る