Skip to content
it4e edited this page Oct 4, 2016 · 3 revisions

Name

<chl/chl.h>

[inline] print, print

Declaration

print(str1, ...);

Description

The inline CHL function print is used to output strings [str1]. Note that the function takes an unspecified number of strings, which it will output.

Arguments

  • str: a string
  • ...: more strings

Return value

No return value.


Examples

main.c

#include <chl/chl.h>
#include <stdio.h>

int main() {
    // Import view file
    chl_view("index.vw");
}

index.vw (view file)

....
<body>
<{ print("Hello world!"); }>
</body>
....

Output: .... <body> Hello world! </body> ....

Example 2, Multiple strings

main.c

#include <chl/chl.h>
#include <stdio.h>

int main() {
    // Import view file
    chl_view("index.vw");
}

index.vw (view file)

....
<body>
<{ print("Hello world!", " My name is Peter."); }>
</body>
....

Output: .... <body> Hello world! My name is Peter. </body> ....

As CHL is open-source, people are able to contribute with their own APIs, plugins and code which means that CHL is constantly upgraded and provided with new features. Do you have an idea for a new CHL feature and want to contribute?

See contribute.

Setup. API. Tutorial. Examples. FastCGI.

Clone this wiki locally