-
Notifications
You must be signed in to change notification settings - Fork 113
Revise pass-by-value and pass-by-reference documentation #1033
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revise pass-by-value and pass-by-reference documentation #1033
Conversation
値渡しと参照渡しの説明を補足てみました。 C言語は参照渡しできない言語なのでC++言語のコードに置き換えました。
|
@shiracamus is attempting to deploy a commit to the YYTypescript Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
リストマークダウンがエラーになるようなので元の記述に戻す(改行するように末尾に空白2個を付ける)
PostILearned内の行末の空白を削除
実引数と仮引数の説明を追加。コードにコメント追加。説明補足。
値渡しコードのコメントに合わせて参照型コードのコメント削除
参照値について説明追加
変数の種類を独立セクションにする
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
※printlnはC++23
対比しやすいようにC言語の書き方でC++コードを書いていることを補足
コードの色付けが変わって対比しずらくなったのでコードブロックの言語指定をcppではなくcにしておく。
値型変数も参照型変数も値渡しと参照渡しができる説明を変数の種類のところに移動
ノットイコールの記入ミス修正
Wikipediaに書いてある「参照の値渡し」を追記
tats-u
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
値型の方もC++23に書き換える場合
C++コードの書き方で統一しました
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
模範的なコードなのでreturn 0;はあったほうがいいですね(なんで今までなかったんだ・・・)
参照値の説明からハッシュ値を削除
prettierエラー対処
|
Prettierでエラーが出ていたので修正しました。 |
C言語は参照渡しできない言語なのでC++言語のコードに置き換えました。
値渡しと参照渡しの説明を補足してみました。
close #739
Note
Rewrites and expands
docs/reference/functions/pass-by-value.mdto clarify pass-by-value vs pass-by-reference (C++ examples) and JavaScript’s pass-by-value with object sharing behavior.docs/reference/functions/pass-by-value.mdintand references; switch output tostd::println.Written by Cursor Bugbot for commit 26c3892. This will update automatically on new commits. Configure here.