Forum SMath SMath Studio Questions Modifying global variables in user defined function 1 pagine (5 elementi) Modifying global variables in user defined function - I am trying to modify a global variable inside a function passed as an argument. - Messaggi Vai all'ultimo post #1 Pubblicato: 30/06/2021 22:28:24 stephen16 0 apprezzamenti in 2 post. Gruppo: User I am expecting the global variable value to change and maintain the change after exiting the function. #2 Pubblicato: 30/06/2021 23:49:39 Alvaro 1.139 apprezzamenti in 1.805 post. Gruppo: User Hi. The only way I know for a function to modify a variable is to pass it by reference to the function.Best regards.Alvaro. #3 Pubblicato: 01/07/2021 00:03:51 stephen16 0 apprezzamenti in 2 post. Gruppo: User Hi Alvaro,Thank you for your reply. How do I do that? Could you share some sample. #4 Pubblicato: 01/07/2021 00:12:28 Alvaro 1.139 apprezzamenti in 1.805 post. Gruppo: User Hi.example_by_ref.sm (4,86 KiB) scaricato 1251 volta(e).Best regards.Alvaro. #5 Pubblicato: 01/07/2021 08:35:00 Jean Giraud 983 apprezzamenti in 6.866 post. Gruppo: User Native Smath has the exceptional feature of being algo style.You can do what you want from in-situ command line. 1 utenti hanno apprezzato questo postOscar Campo 01/07/2021 10:50:00 1 pagine (5 elementi) Nuovi post Nessun nuovo post