memory adress/modular/file
-
Hello,
I'm sorry, i'm french and, i have a bad level in english. I'm sorry if is difficulte for read.For the first, i have a problem with the passage in the function. For example, in th "C" langage we have :
Toto (int *a)
{
*a = *a + 1
}toto(&a)
existing in fuze ? if, we have this in fuze what is the syntax ?
For the second answer, whene we coding, we can write the different function on different file. Is more easy to read and understande. We can make this on fuze ?
Finaly, can we write my document on my PC and put the file on my switch for execute the program ?
Thank's for you replay.
Have a nice day. -
This post is deleted! -
For the first answer, i search more and, i discover the solution. We use the key word "ref" for exeample :
function toto (ref a)
a = a + 1
retrn voidtoto (a)
-
In theory I think that ref should work that way, but it does not currently affect ints, strings, vectors, floats, etc.
It does work for arrays of structs, though!I guess someone in the Fuze team can give a better answer, but it is my understanding that this is something that is being worked on and will be fixed in one of the coming patches.
-
That's correct, this is being worked on for the next patch. The code below:
function toto(ref a) a = a + 1 return void toto(a)
...Does not affect the value of
a
in version 2.15.0 but will work correctly in the next patch. In the meantime, consider returning a value from the function or using a structure or list (ref works correctly for these).For the second answer, whene we coding, we can write the different function on different file. Is more easy to read and understande. We can make this on fuze ?
Finaly, can we write my document on my PC and put the file on my switch for execute the program ?
FUZE does not currently support multiple code files in one project. We're exploring options that can help organize code better, but for now the best option for organizing code is using code bookmarks (R3).
Unfortunately there is not currently a way to transfer code or other text from the PC to the Switch. If you have a USB keyboard, you can plug it into the Switch or the dock to write code easier on the Switch.