{"action":"created","comment":{"url":"https://api.github.com/repos/ethereum/solidity/pulls/comments/202065955","pull_request_review_id":136689469,"id":202065955,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMjA2NTk1NQ==","diff_hunk":"@@ -51,40 +54,63 @@ write::\n \n The names of output parameters can be omitted.\n The output values can also be specified using ``return`` statements.\n-The ``return`` statements are also capable of returning multiple\n-values, see :ref:`multi-return`.\n+\n+The ``return`` statements are also capable of returning multiple values using ``return (v0, v1, ..., vn)``. The number of parameters must equal the number of output parameters.\n+\n Return parameters are initialized to zero; if they are not explicitly\n set, they stay to be zero.\n \n Input parameters and output parameters can be used as expressions in\n the function body.  There, they are also usable in the left-hand side\n of assignment.\n \n+.. index:: return array, return string, array, string, array of strings, dynamic array, variable sized array\n+\n+.. _return-array:\n+\n+Returning Strings and Arrays\n+----------------------------\n+\n+You can return strings and arrays from Solidity functions, see `array_receiver_and_returner.sol <https://github.com/fivedogit/solidity-baby-steps/blob/master/contracts/60_array_receiver_and_returner.sol>`_ for an example.\n+\n+.. index:: return struct, struct\n+\n+.. _return-struct:\n+\n+Returning Structs\n+-----------------\n+\n+You can return a ``struct`` from a Solidity function, but only from ``internal`` function calls.\n+\n .. index:: if, else, while, do/while, for, break, continue, return, switch, goto\n \n Control Structures\n ===================\n \n-Most of the control structures from JavaScript are available in Solidity\n-except for ``switch`` and ``goto``. So\n-there is: ``if``, ``else``, ``while``, ``do``, ``for``, ``break``, ``continue``, ``return``, ``? :``, with\n-the usual semantics known from C or JavaScript.\n+Supported Expressions\n+---------------------\n \n-Parentheses can *not* be omitted for conditionals, but curly brances can be omitted\n-around single-statement bodies.\n+Most of the `control structures from JavaScript <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Control_flow_and_error_handling>`_ are available in Solidity except for ``switch`` and ``goto``. The full list is:\n \n-Note that there is no type conversion from non-boolean to boolean types as\n-there is in C and JavaScript, so ``if (1) { ... }`` is *not* valid\n-Solidity.\n+- ``if``","path":"docs/control-structures.rst","position":72,"original_position":72,"commit_id":"d836322199d55fe60d3fe7b224755c8baea4b468","original_commit_id":"d836322199d55fe60d3fe7b224755c8baea4b468","user":{"login":"chriseth","id":9073706,"node_id":"MDQ6VXNlcjkwNzM3MDY=","avatar_url":"https://avatars2.githubusercontent.com/u/9073706?v=4","gravatar_id":"","url":"https://api.github.com/users/chriseth","html_url":"https://github.com/chriseth","followers_url":"https://api.github.com/users/chriseth/followers","following_url":"https://api.github.com/users/chriseth/following{/other_user}","gists_url":"https://api.github.com/users/chriseth/gists{/gist_id}","starred_url":"https://api.github.com/users/chriseth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriseth/subscriptions","organizations_url":"https://api.github.com/users/chriseth/orgs","repos_url":"https://api.github.com/users/chriseth/repos","events_url":"https://api.github.com/users/chriseth/events{/privacy}","received_events_url":"https://api.github.com/users/chriseth/received_events","type":"User","site_admin":false},"body":"Perhaps better to list them like this:\r\n\r\n - `if (<condition>) <true-statement>`\r\n - `if (<condition>) <true-statement> else <false-statement>`\r\n\r\nand so on","created_at":"2018-07-12T14:55:51Z","updated_at":"2018-07-12T14:55:52Z","html_url":"https://github.com/ethereum/solidity/pull/4497#discussion_r202065955","pull_request_url":"https://api.github.com/repos/ethereum/solidity/pulls/4497","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/comments/202065955"},"html":{"href":"https://github.com/ethereum/solidity/pull/4497#discussion_r202065955"},"pull_request":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/4497"}}},"pull_request":{"url":"https://api.github.com/repos/ethereum/solidity/pulls/4497","id":200990594,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwOTkwNTk0","html_url":"https://github.com/ethereum/solidity/pull/4497","diff_url":"https://github.com/ethereum/solidity/pull/4497.diff","patch_url":"https://github.com/ethereum/solidity/pull/4497.patch","issue_url":"https://api.github.com/repos/ethereum/solidity/issues/4497","number":4497,"state":"open","locked":false,"title":"Move control structure related FAQ points","user":{"login":"ChrisChinchilla","id":42080,"node_id":"MDQ6VXNlcjQyMDgw","avatar_url":"https://avatars2.githubusercontent.com/u/42080?v=4","gravatar_id":"","url":"https://api.github.com/users/ChrisChinchilla","html_url":"https://github.com/ChrisChinchilla","followers_url":"https://api.github.com/users/ChrisChinchilla/followers","following_url":"https://api.github.com/users/ChrisChinchilla/following{/other_user}","gists_url":"https://api.github.com/users/ChrisChinchilla/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisChinchilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisChinchilla/subscriptions","organizations_url":"https://api.github.com/users/ChrisChinchilla/orgs","repos_url":"https://api.github.com/users/ChrisChinchilla/repos","events_url":"https://api.github.com/users/ChrisChinchilla/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisChinchilla/received_events","type":"User","site_admin":false},"body":"Part of https://github.com/ethereum/solidity/issues/1219 plus some formatting and language fixes in related content.","created_at":"2018-07-12T12:51:03Z","updated_at":"2018-07-12T14:55:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d91f41ddf794e3bd4cf8b021f49d3efca74940a9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ethereum/solidity/pulls/4497/commits","review_comments_url":"https://api.github.com/repos/ethereum/solidity/pulls/4497/comments","review_comment_url":"https://api.github.com/repos/ethereum/solidity/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ethereum/solidity/issues/4497/comments","statuses_url":"https://api.github.com/repos/ethereum/solidity/statuses/d836322199d55fe60d3fe7b224755c8baea4b468","head":{"label":"ethereum:faq-reorg-control-structures","ref":"faq-reorg-control-structures","sha":"d836322199d55fe60d3fe7b224755c8baea4b468","user":{"login":"ethereum","id":6250754,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyNTA3NTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6250754?v=4","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"repo":{"id":40892817,"node_id":"MDEwOlJlcG9zaXRvcnk0MDg5MjgxNw==","name":"solidity","full_name":"ethereum/solidity","owner":{"login":"ethereum","id":6250754,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyNTA3NTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6250754?v=4","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ethereum/solidity","description":"Solidity, the Contract-Oriented Programming Language","fork":false,"url":"https://api.github.com/repos/ethereum/solidity","forks_url":"https://api.github.com/repos/ethereum/solidity/forks","keys_url":"https://api.github.com/repos/ethereum/solidity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethereum/solidity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethereum/solidity/teams","hooks_url":"https://api.github.com/repos/ethereum/solidity/hooks","issue_events_url":"https://api.github.com/repos/ethereum/solidity/issues/events{/number}","events_url":"https://api.github.com/repos/ethereum/solidity/events","assignees_url":"https://api.github.com/repos/ethereum/solidity/assignees{/user}","branches_url":"https://api.github.com/repos/ethereum/solidity/branches{/branch}","tags_url":"https://api.github.com/repos/ethereum/solidity/tags","blobs_url":"https://api.github.com/repos/ethereum/solidity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethereum/solidity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethereum/solidity/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethereum/solidity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethereum/solidity/statuses/{sha}","languages_url":"https://api.github.com/repos/ethereum/solidity/languages","stargazers_url":"https://api.github.com/repos/ethereum/solidity/stargazers","contributors_url":"https://api.github.com/repos/ethereum/solidity/contributors","subscribers_url":"https://api.github.com/repos/ethereum/solidity/subscribers","subscription_url":"https://api.github.com/repos/ethereum/solidity/subscription","commits_url":"https://api.github.com/repos/ethereum/solidity/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethereum/solidity/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethereum/solidity/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethereum/solidity/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethereum/solidity/contents/{+path}","compare_url":"https://api.github.com/repos/ethereum/solidity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethereum/solidity/merges","archive_url":"https://api.github.com/repos/ethereum/solidity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethereum/solidity/downloads","issues_url":"https://api.github.com/repos/ethereum/solidity/issues{/number}","pulls_url":"https://api.github.com/repos/ethereum/solidity/pulls{/number}","milestones_url":"https://api.github.com/repos/ethereum/solidity/milestones{/number}","notifications_url":"https://api.github.com/repos/ethereum/solidity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethereum/solidity/labels{/name}","releases_url":"https://api.github.com/repos/ethereum/solidity/releases{/id}","deployments_url":"https://api.github.com/repos/ethereum/solidity/deployments","created_at":"2015-08-17T12:27:26Z","updated_at":"2018-07-12T14:25:56Z","pushed_at":"2018-07-12T14:17:45Z","git_url":"git://github.com/ethereum/solidity.git","ssh_url":"git@github.com:ethereum/solidity.git","clone_url":"https://github.com/ethereum/solidity.git","svn_url":"https://github.com/ethereum/solidity","homepage":"https://solidity.readthedocs.io","size":20811,"stargazers_count":5455,"watchers_count":5455,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1425,"mirror_url":null,"archived":false,"open_issues_count":613,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":1425,"open_issues":613,"watchers":5455,"default_branch":"develop"}},"base":{"label":"ethereum:develop","ref":"develop","sha":"fa8102880f87c5a2806d59f959fd3e8a62dd4dc9","user":{"login":"ethereum","id":6250754,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyNTA3NTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6250754?v=4","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"repo":{"id":40892817,"node_id":"MDEwOlJlcG9zaXRvcnk0MDg5MjgxNw==","name":"solidity","full_name":"ethereum/solidity","owner":{"login":"ethereum","id":6250754,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyNTA3NTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6250754?v=4","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ethereum/solidity","description":"Solidity, the Contract-Oriented Programming Language","fork":false,"url":"https://api.github.com/repos/ethereum/solidity","forks_url":"https://api.github.com/repos/ethereum/solidity/forks","keys_url":"https://api.github.com/repos/ethereum/solidity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethereum/solidity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethereum/solidity/teams","hooks_url":"https://api.github.com/repos/ethereum/solidity/hooks","issue_events_url":"https://api.github.com/repos/ethereum/solidity/issues/events{/number}","events_url":"https://api.github.com/repos/ethereum/solidity/events","assignees_url":"https://api.github.com/repos/ethereum/solidity/assignees{/user}","branches_url":"https://api.github.com/repos/ethereum/solidity/branches{/branch}","tags_url":"https://api.github.com/repos/ethereum/solidity/tags","blobs_url":"https://api.github.com/repos/ethereum/solidity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethereum/solidity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethereum/solidity/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethereum/solidity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethereum/solidity/statuses/{sha}","languages_url":"https://api.github.com/repos/ethereum/solidity/languages","stargazers_url":"https://api.github.com/repos/ethereum/solidity/stargazers","contributors_url":"https://api.github.com/repos/ethereum/solidity/contributors","subscribers_url":"https://api.github.com/repos/ethereum/solidity/subscribers","subscription_url":"https://api.github.com/repos/ethereum/solidity/subscription","commits_url":"https://api.github.com/repos/ethereum/solidity/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethereum/solidity/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethereum/solidity/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethereum/solidity/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethereum/solidity/contents/{+path}","compare_url":"https://api.github.com/repos/ethereum/solidity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethereum/solidity/merges","archive_url":"https://api.github.com/repos/ethereum/solidity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethereum/solidity/downloads","issues_url":"https://api.github.com/repos/ethereum/solidity/issues{/number}","pulls_url":"https://api.github.com/repos/ethereum/solidity/pulls{/number}","milestones_url":"https://api.github.com/repos/ethereum/solidity/milestones{/number}","notifications_url":"https://api.github.com/repos/ethereum/solidity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethereum/solidity/labels{/name}","releases_url":"https://api.github.com/repos/ethereum/solidity/releases{/id}","deployments_url":"https://api.github.com/repos/ethereum/solidity/deployments","created_at":"2015-08-17T12:27:26Z","updated_at":"2018-07-12T14:25:56Z","pushed_at":"2018-07-12T14:17:45Z","git_url":"git://github.com/ethereum/solidity.git","ssh_url":"git@github.com:ethereum/solidity.git","clone_url":"https://github.com/ethereum/solidity.git","svn_url":"https://github.com/ethereum/solidity","homepage":"https://solidity.readthedocs.io","size":20811,"stargazers_count":5455,"watchers_count":5455,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1425,"mirror_url":null,"archived":false,"open_issues_count":613,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":1425,"open_issues":613,"watchers":5455,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/4497"},"html":{"href":"https://github.com/ethereum/solidity/pull/4497"},"issue":{"href":"https://api.github.com/repos/ethereum/solidity/issues/4497"},"comments":{"href":"https://api.github.com/repos/ethereum/solidity/issues/4497/comments"},"review_comments":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/4497/comments"},"review_comment":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/4497/commits"},"statuses":{"href":"https://api.github.com/repos/ethereum/solidity/statuses/d836322199d55fe60d3fe7b224755c8baea4b468"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"chriseth"}}