GitHub    Download    Forum
Overview
Tutorial
C++ API
C# API
DTDL
Comments, Preprocessor
Definitions
Data types
Namespaces
Restrictions
DADL
Setup

Comments, Preprocessor

Comments

You can write comments in the files in the C++ format.
// Comment Type 1

/* Command Type 2 */

Preprocessor

The language uses two types of preprocessor command: #include and #use. They both load an external file. While #include imports the file and all the definitions inside completely, the #use command imports all the definitions as external definitions.
The difference between the <path> and "path" format is how the file is searched. While "path" takes the current file as the starting point, <path> takes the input directories passed to the compiler as the starting point for the search.
#include <file.dtdl>
#include "..\directory\file.dtdl"

#use <directory2\file2.dtdl>
#use "file2.dtdl"
Definitions can be imported into a namespace. This can be used to group definitions. It also allows collisions (when imported definitions have the same name) to be solved.
#include <file.dtdl> namespace productA
#include "..\directory\file.dtdl" namespace productB::version2

#use <directory2\file2.dtdl> namespace productA
#use "file2.dtdl" namespace productA
See Namespaces for more information.
© 2022 Mobiland AG