C/C++, C#, Java, JSP, JavaScript and PHP flow charts

Supported languages

Visustin generates flow charts from code written in any of C, C++, C#, Java, JSP, JavaScript, ASP and PHP.

Older versions than those listed above are generally supported.

Other versions. Try Visustin with other versions and dialects of the above languages. Visustin works reasonably with many other enviroments than just the ones listed above. Syntax extensions of such versions are not supported, but should not cause major failure. You may see isolated effects such as individual statements not doing what you expect. If you find any issues, please report your findings to us.

Supported statements

The syntax of these "semicolon" languages is quite similar. Naturally, there are some important differences as well. The following statements are supported.

Other statements are supported but have no specific visualization. Certain non-executable blocks are not visualized, because they contain no control flow:

Note:

Scripting languages (JavaScript, JSP, PHP)

JavaScript/ASP

In mode JavaScript, ASP, Visustin flowcharts plain JavaScript and also JavaScript embedded on HTML or ASP pages. Visustin automatically detects the language mode, which is one of the following:

ASP Server-side JavaScript (*.asp)
Everything within <%...%> is assumed to be JavaScript.
Used when: <% or %> are found.
HTML Client-side JavaScript (*.html)
Flowchart the code within <SCRIPT>...</SCRIPT> tags. Everything else is HTML.
Used when: Code is HTML but no ASP <% tag exists.
Plain (*.js)
The code is flowcharted "as is" without HTML.
Used when: Code is not HTML.

When flowcharting a code snippet (not an entire file), select only the JavaScript code, no HTML tags. Alternatively, include the opening tag <% or <SCRIPT> to make Visustin correctly detect the language mode.

If the code contains both server-side and client-side scripts, server-side scripts are flowcharted while client-side scripts are ignored. Remove <%...%> to flowchart as client-side script.

Where the code mixes several scripting languages, only JavaScript is flowcharted. Use VBScript mode to flowchart VBScript code.

The file extension (*.asp, *.html, *.js) has no actual meaning to Visustin.

JSP

Visustin supports the server-side code on JavaServer Pages (JSP). The following tags are supported: <%..%> <%!..%> <%--..--%>. Code within these tags is parsed as Java or JSP comments. All other tags are treated as HTML. In particular, XML style JSP tags are not supported (<jsp:scriptlet> etc.).

PHP

Visustin supports the following tags in PHP mode: <?..?> <?php..?> <%..%>. Code within these tags is parsed as server-side PHP code. All other tags are treated as HTML. In particular, client-side HTML SCRIPT tags are not supported (<script language="php">).

Pre-processor directives

#if..#elif..#else..#endif -style conditional directives are supported for C/C++, C# and Java (J++/J#). There are 2 modes to choose from: show as comments and show as flow symbols. Show as comments displays pre-processor directives "as is" at the location they appear in the code. Show as flow symbols treats the pre-processor directives as if they were regular conditional statements (if..elif..else). This works well in many cases. Because pre-processor directives are not really executable code, though, this mode may cause some unwanted effects. If it doesn't work out well, use the Show as comments mode.

#define macros are not expanded. If the flow chart doesn't appear correct (say the logic depends on the value of a constant), you need to manually remove any uncompiled branches and expand macros to visualize the run-time logic correctly.

#include statements, or similar, are not supported.

Limitations

The following syntax is unsupported or only limited support is provided. The chart may display a normal statement, not a branch or a jump.

C/C++ digraphs and trigraphs

Visustin fully supports C/C++ digraph and trigraph sequences:
<% %> <: :> %: %:%: ??= ??/ ??' ??( ??) ??! ??< ??> ??-

Inline assembly language

Inlined assembler instructions need to be charted separately. To flowchart assembly language code embedded in C/C++ files, process it in assembler mode.

©Aivosto Oy