Conventions

Naming Convention

Almost all the Weld objects can be assigned a name. This name will be converted to an identifier by the code generator, so they should follow the C/C++ naming standards as they are listed here.

  • Only alphabetic characters, digits and underscores (_) are allowed in an identifier
  • Identifiers must be start with an alphabet or underscore (_) only, no other special characters
  • Spaces cannot be used between two words of an identifier

Reserved Keywords

The following is a list of reserved keywords that are used as special functions with the Weld code generator. You should avoid using these keywords anywhere in your project, other that where it is intended, inside the Weld application.

hasChanged, after, send, receive, forward, discard, txBuff, rxBuff, set, clear, cleanup, forward

These keywords are picked up by the code generator are are processes as Weld special functions and in some cased are replaced by macros. If they are used in any context other than the Weld special function, they might result in failed code generation, or unpredictable code behavior.

Warning

Do not use the Weld reserved keywords anywhere in your software, other than where that are intended within the Weld application.

Data Types

Weld used the stdint.h library to identify integers, so this library is included in the generated code and should be accessible inside your project environment.