Skip to content

Latest commit

 

History

History
23 lines (13 loc) · 538 Bytes

example.md

File metadata and controls

23 lines (13 loc) · 538 Bytes

This is an example of a literate program.

Unlike most source code, which allows comments to be expressed inside control structures, literate code is expressed primarly as a comment, with executable code peppered inside.

Code sections are defined as a right angle-bracket in the first position of the line.

/* This is an exportable chunk of code */

#include <stdio.h>
#include <stdlib.h>

int main() {
  printf("hello world\n");
  return 0;
}

This is not code.

/* This is code */