Main Features Download Documentation Resources

Identifiers

About

Most programming language have a list of keywords (which follow the same format as identifiers) that construct the different syntactic elements of the language. For example, most programming languages use the keyword "if" for conditional statements.

It is possible to create a variable name (or function name) in one language that would not be valid in another. Visual Basic programmers, for example, can create a variable called "float" since it isn't a keyword (VB uses "single" for single-precision floating point numbers). While it is valid in VB, the identifier cannot be used verbatim if the program is converted to Java. In this case, "float" is a reserved word.

The result conflict will cause the generated code to be invalid (i.e. a syntax error).

Creating New Identifiers

Templates contain two sections that are designed to generate new identifiers (if needed). Both sections contain the same keys and basic behavior. The original Flowgorithm identifier is checked again the list of Keywords and Conflict values that are defined in the Language section. If no conflict is found, the Normal key will be used to create the identifier. If a conflict is found, then the Conflict key is used.

Java Example
[Function ID]
Convention = camel
Normal = {Name}
Conflict = func_{Name}
 
[Variable ID]
Convention = camel
Normal = {Name}
Conflict = var_{Name}

Note: The underscore character _ is not allowed in Flowgorithm identifiers. It can be used to create a unique prefix (or postfix) string of characters.

Convention Key

The Convention key is used to create an identifier using the target language's naming convention. It can contain either of the two options:

  1. proper
  2. camel

Propercase is used by languages such as Visual Basic and Smalltalk. In this convention, the first letter of each word capitalized such as TestProgram and FirstName. Languages, such as Java and C#, use this convention only for class names.

Camelcase is used for variable names in languages such as C# and Java. In this convention, the first letter of the first word is in lowercase while the rest are in uppercase. Examples include: testProgram and firstName.

Fields
None
Flags
None

Normal Key

If the identifier, used in the flowchart, does not conflict with the target language's keywords, then this key is used.

Fields Contents
{Name} The original Flowgorithm identifier.
Flags When True
integer The identifier is an Integer.
real The identifier is a Real.
boolean The identifier is an Boolean.
string The identifier is an String.
none The identifier doesn't have a known type - i.e. not declared. This is good for a "default" syntax.

Conflict Key

If the Flowgorithm identifier conflicts with one of the target language's keywords, this key is used to generate a new identifier.

Fields Contents
{Name} The original Flowgorithm identifier.
Flags When True
integer The identifier is an Integer.
real The identifier is a Real.
boolean The identifier is an Boolean.
string The identifier is an String.
none The identifier doesn't have a known type - i.e. not declared. This is good for a "default" syntax.