Hello.
I am "stuck" in my learning of Nim. In the attached code, I don't know how to get rid of the error: 'introduccionValoresEnCampos' can have side effects.
Would you be so kind as to review the code to know why I get this error in the function in question?
Best regards. Antonio F.S.
import std/rdstdin import std/strutils
return (nombre, tipo, edad)
Hi.
Hello
It seems that the code has lost its formatting when sending the message. Is it possible to attach the source file?
Best regards. Antonio F.S.
Hello.
It is clear that such concepts are not too understandable for me with Nim.
I will study your reply, for which I am very grateful.
Best regards. AntonioF.S.
Hello.
Actually my approach was wrong because no function was needed in this case. The thing is that changing the mindset from one language to another takes time and effort. But it has helped me a lot to realise that in Nim functions have a correctly strict semantic connotation.
The code (if you are kind enough to reformat it) will look like below.
Thank you very much (I continue with my study of Nim).
Best regards. Antonio F.S.
import std/rdstdin import std/strutils
introduccionValoresEnCampos() verDatosVectores()