Mixly Block Category - Factory
Contents
Include a Library
This block includes a library. A library is a file that contains code for functionality.
- Library Name - the name of the Library file. Usually the class name.
Read more here: https://www.arduino.cc/en/reference/libraries
Call a Function with Parameter(s)
This calls a Function / Procedure with parameter(s) or without. The number of parameters is configurable using the gear icon. There are two variants, one that has no return value and one that expects a return value.
- Function Name - the name of the Function / Procedure to be called.
- Parameters / Input Variables - variables, statements or constants that will be passed to the Function / Procedure.
Declare a Variable with a Type
This block allows the declaration of variables.
- Data Type - the type of Data Type for the variable being declared.
- Variable Name - the name of the variable being declared.
Read more here: https://www.arduino.cc/en/Reference/VariableDeclaration
Call Member Function of a Variable
Some Data Types have member functions. Member functions are functions that are acted upon the variable of Data Type.
Example:
- Data Type of String has a member function length. Which returns the number of characters in a String variable.
- Variable student_name of type String
- student_name . length will return the number of characters in student_name
With Parameter(s)
Parameters or Input Variables can be passed to the member function. Some member functions support or require additional parameters or input variables. This can be configured with the gear icon on the block. Drag to add or remove inputs.
Call Static Function of a Class
Some Data Types have static member functions. Static Member functions are functions that are class specific. These are different than regular member function which act upon instances of the class (variables). Static member functions are acted upon the class itself.
Example:
- Data Type / Class of ExampleClass has a static member function version. Which returns the version number of the Class implementation.
- ExampleClass :: version will return the version number.
Read more here: http://www.learncpp.com/cpp-tutorial/812-static-member-functions/
With Parameter(s)
Parameters or Input Variables can be passed to the static member function. Some static member functions support or require additional parameters or input variables. This can be configured with the gear icon on the block. Drag to add or remove inputs.
Custom Code Line
This blocks directly add this line of code to the source code. It is a way of adding code which otherwise wouldn't be possible using Mixly blocks.
- Code - textual code that gets directly added to the overall source code.
Custom Attachment / Assignment
This block assigns the contents directly (as in code). Useful if the contents cannot be directly represented in Mixly blocks.
- Contents - Text is assigned or returns as in of source code.