Variables

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
flowcode-developer
Posts: 37
http://meble-kuchenne.info.pl
Joined: Thu Feb 02, 2023 9:32 pm
Has thanked: 19 times
Been thanked: 3 times

Variables

Post 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

kersing
Valued Contributor
Posts: 192
Joined: Wed Dec 02, 2020 7:28 pm
Has thanked: 77 times
Been thanked: 64 times

Re: Variables

Post 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.

Post Reply