Page 1 of 1

Variables

Posted: Tue Feb 14, 2023 4:59 pm
by flowcode-developer
Hello,
I am new to Flowcode. I have Flowcode V10, professional license. I want to see if someone can help clarify some things for me regarding variables. I looked at some of the tutorials on YouTube because I like to learn through videos. I see that in some videos when they create a new variable, they give the variable a name and choose a variable type(ex byte). They do not enter an initial value. Why is that? When I do the same thing on my end and try to debug, I get an error message. What should I do to get around the issue? (Initialize with 0?) My background is in python, and I know I would not be able to get away with not initializing a variable.

Thank you for your help

Re: Variables

Posted: Tue Feb 14, 2023 5:08 pm
by kersing
You do not need to initialize a variable when declaring/creating it, however you need to make sure to assign it some value before using it for any purpose (apart from assigning a value) to prevent random behavior on a microcontroller.