<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>KUROGOMA</author_name>
  <author_url>https://blog.hatena.ne.jp/KUROGOMA/</author_url>
  <blog_title>黒ごまのおむすび</blog_title>
  <blog_url>https://kurogoma.hatenadiary.jp/</blog_url>
  <categories>
    <anon>プログラミング</anon>
    <anon>PHP</anon>
    <anon>Python</anon>
    <anon>C</anon>
    <anon>C++</anon>
    <anon>C#</anon>
    <anon>objective-C</anon>
    <anon>javascript</anon>
  </categories>
  <description>下記URLに移転しました。 5秒後に自動的にリダイレクトします 背景 複数の値に同時に代入したいことがたまにある。 (その行為が妥当かどうなのかは置いておいて) 普通に a = 0; b = 0; とすればよいのだけれど、 どうせならもっとスマートな書き方を知っておこうということで調べてみた結果をまとめる。 結論 a = b = 0; どの言語もだいたい上記のような書き方で宣言できる。 「代入」はそもそも「式」なので、一文で記入した場合、右から評価される。 それゆえ、このような書き方ですべての変数に代入することが可能となる。 言語ごとの違い C / C++ / C＃ / Objective-C…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkurogoma.hatenadiary.jp%2Fentry%2F20170203-multiassignment&quot; title=&quot;複数の変数に同じ値を代入する(同時代入) - 黒ごまのおむすび&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>2017-02-03 20:41:25</published>
  <title>複数の変数に同じ値を代入する(同時代入)</title>
  <type>rich</type>
  <url>https://kurogoma.hatenadiary.jp/entry/20170203-multiassignment</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
