Question
Actualizado en
26 dic 2016
- Japonés
-
Inglés (US)
-
Alemán
-
Inglés (UK)
Pregunta de Inglés (US)
¿Qué significa Multiple values on the sides of an assignment is not only to functions. ?
¿Qué significa Multiple values on the sides of an assignment is not only to functions. ?
I think it's not written by a native speaker but I can't understand the relationship between "multiple values" and "to function". (TT)
Respuestas
28 dic 2016
Respuesta destacada
- Inglés (US)
That looks correct, but I'm not fluent in Japanese, so I'm not 100% sure
I think the original sentence was worded in a confusing way. It means that it's not always "a,b = function()" and can also be something like "a,b = b,a"
Was this answer helpful?
Lee más comentarios
- Inglés (US)
I can't understand the sentence but it seems like this is about programming. I am a computer science major so I might be able to understand if I see the context.
前後を見せて下さい。
Was this answer helpful?
- Japonés
Yes, this is about programming, Golang ;) I'm translating this article into Japanese but I couldn't really understand "to function"
The whole paragraph is:
----------------------------------------------------------
Function Return Values
Functions can return not only one single value, but multiple values. This seems to be a bad practice if not used properly. Python does that. Perl does that. It can be of good use. It is mainly used to return a value and a ‘nil’ or error code. This way the old habit of encoding the error into the returned type (usually returning -1 as error code and some non-negative value in case there is some meaningful return value as in C std library calls) is replaced with something much more readable.
Multiple values on the sides of an assignment is not only to functions. To swap two values you can write:
a,b = b,a
----------------------------------------------------------
I translated that part like this:
「代入の両側の、複数ある値は、関数に渡されるだけではない。二つの値を入れ替えるには、次のように書くことができる。」
Do you think 「関数に」 is correct?
Thank you for your help!!
The whole paragraph is:
----------------------------------------------------------
Function Return Values
Functions can return not only one single value, but multiple values. This seems to be a bad practice if not used properly. Python does that. Perl does that. It can be of good use. It is mainly used to return a value and a ‘nil’ or error code. This way the old habit of encoding the error into the returned type (usually returning -1 as error code and some non-negative value in case there is some meaningful return value as in C std library calls) is replaced with something much more readable.
Multiple values on the sides of an assignment is not only to functions. To swap two values you can write:
a,b = b,a
----------------------------------------------------------
I translated that part like this:
「代入の両側の、複数ある値は、関数に渡されるだけではない。二つの値を入れ替えるには、次のように書くことができる。」
Do you think 「関数に」 is correct?
Thank you for your help!!
- Inglés (US)
That looks correct, but I'm not fluent in Japanese, so I'm not 100% sure
I think the original sentence was worded in a confusing way. It means that it's not always "a,b = function()" and can also be something like "a,b = b,a"
Was this answer helpful?
- Inglés (US)
Would you mind sending me the link to the translated article after you finish writing it? I'd like to practice my Japanese by reading it :)
Was this answer helpful?
- Japonés
Thank you so much for your help! I think I understood it :)
Sure, how can I send it to you?
Sure, how can I send it to you?
- Inglés (US)
- Japonés
Sorry, I noticed this now. I'm gonna send you soon :)
どういたしまして!
どういたしまして!
[News] Hey you! The one learning a language!
Do you know how to improve your language skills❓ All you have to do is have your writing corrected by a native speaker!
With HiNative, you can have your writing corrected by both native speakers and AI 📝✨.
With HiNative, you can have your writing corrected by both native speakers and AI 📝✨.
Regístrate
Preguntas similares
Preguntas similares
- ¿Esto suena natural? The values of things are not only determined by the prices you payed, but al...
- ¿Esto suena natural? It is argued that those values cherished by older generations are no longer ...
- in a nutritional values table, when there is the percentage based on daily needed kcal, it is bet...
Trending questions
- ¿Qué significa send nudes ?
- ¿Qué significa That sounds like just what the doctor ordered?
- ¿Qué significa got put off?
- ¿Qué significa the tortured poets department?
- ¿Qué significa down to earth ?
Newest Questions (HOT)
Newest Questions
- ¿Qué significa Patito "Me comentan mis asesores que algunas de las playeras han salido precisa...
- ¿Qué significa Gracias diosito te bending a hoy y siempre?
- ¿Qué significa What does « tamos » mean ? ?
- ¿Qué significa Ubicar "Carlos nos invitó. Ubicas a Carlos, ¿no? El dueño de los Camoteros."?
- ¿Qué significa Mándales un mensaje a la página?
Previous question/ Next question
Thank you! Rest assured your feedback will not be shown to other users.
Thank you very much! Your feedback is greatly appreciated.