summaryrefslogtreecommitdiffstats
path: root/emacs.d/nxhtml/tests/in/noweb1.now
blob: 1df9074b12ae1b4e4178f91264a43651c6237a41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
@
\section{Hello world}

Today I awakened and decided to write
some code, so I started to write a Hello World in \textsf C.

<<hello.c>>=
/*
  <<license>>
*/
#include <stdio.h>

int main(int argc, char *argv[]) {
  printf("Hello World!\n");
  return 0;
}
@
\noindent \ldots then I did the same in PHP.

<<hello.sql>>=
SELECT * FROM Persons
WHERE FirstName LIKE '%a'
@
<<hello.php>>=
<?php
  /*
  <<license>>
  */
  echo "Hello world!\n";
?>
@
\section{License}
Later, same day some lawyer reminded me about licenses.
So, here it is:

<<license>>=
This work is placed in the public domain.
@