<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mikado193</author_name>
  <author_url>https://blog.hatena.ne.jp/mikado193/</author_url>
  <blog_title>働いたら負けかなと思ってる</blog_title>
  <blog_url>https://mikado.hatenablog.jp/</blog_url>
  <categories>
    <anon>プログラミング</anon>
  </categories>
  <description>”i++”というようなインクリメント演算子や”i--”といったデクリメント演算子をreturnで返す場合には注意が必要です。 この”++”は変数の前に記述する場合と、後に記述する2種類の記述方法があります。 前後のどちらに記述するかによって動作にも違いがあります。 前に書くと処理の開始時に変数＋１された状態で処理が実行され、後に書くと処理が終了した後に変数＋１されます。 このインクリメント演算子・デクリメント演算子をreturnで返す場合、前後を間違えると適切な値が返されないことになります。 わかりやすく書き直してみます。 例１：”return ++i;”を書きなおすと i = i + 1;r…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmikado.hatenablog.jp%2Fentry%2F2014%2F05%2F31%2F022823&quot; title=&quot;returnでのインクリメント演算子・デクリメント演算子 - 働いたら負けかなと思ってる&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2014-05-31 02:28:23</published>
  <title>returnでのインクリメント演算子・デクリメント演算子</title>
  <type>rich</type>
  <url>https://mikado.hatenablog.jp/entry/2014/05/31/022823</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
