Skip to main content

Comments

Single-Line Comments

A single-line comment starts with two slashes // in std-atem:

import std.stdatem;
import std.stdatemlib;

main: func {
//A program that will output "Hello World" to the console
std.stdatemlib.io.println("Hello World!"); //Using println function to print
}

Multiple-Line Comments

A multiple-line comment is contained in //{...}// block:

//{
importing the Atem modules

:)
}//
import std.stdatem;
import std.stdatemlib;

main: func {
std.stdatemlib.io.println("Hello World!");
}

Unlike the multiline comment in C, you can write nested multiline comments:

//{
//{
this is no problem
}//
}//

Doc Comments

You can create doc comments by using //!:

//!Concept for additive operator
//!Implement this concept to make additive operator work on your types
AddConcept: concept = {
requires add: infix binary operator(lhs: Self, rhs: Self);
}

You can also create multiline doc comments by //!{...}// blocks:

//!{
Concept for additive operator
Implement this concept to make additive operator work on your types
}//
AddConcept: concept = {
requires add: infix binary operator(lhs: Self, rhs: Self);
}

Top-level Doc Comments

To create a module-level doc comments, use ///!:

///!Atem Standard Library, Type traits module

Similarly, you can also write a multiline module-level doc comment:

///!{
Atem Standard Library
Type traits module
}///