Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #+title: Test of Literate Programming
- #--------------------------------------------------------
- #COLLECTION
- #--------------------------------------------------------
- #Below I have a collection of several hello world !
- #I don't want to execute them neither show the source now
- #+name: cpp_hello_world
- #+begin_src C++ -n :exports none
- #include <iostream>
- int main(int argc, char ** argv)
- {
- std::cout << "Hello World !" << std::endl;
- std::cout << "fglkjfglk" << std::endl;
- std::cout << "dkfjdfkjdkdjfkdjfkdfjdkf" << std::endl;
- return 0;
- }
- #+end_src
- #+name: haskell_hello_world
- #+begin_src haskell -n :exports none
- [1..10]
- putStrLn "Hello World !"
- #+end_src
- #+name: r_hello_world
- #+begin_src R -n :exports none
- x <- 1:5
- print(x)
- print("Hello World !")
- #+end_src
- #--------------------------------------------------------
- #END COLLECTION
- #--------------------------------------------------------
- * Hello Word in C++
- Here is the source code :
- #+call: cpp_hello_world [:exports code]
- and here is the result :
- #+call: cpp_hello_world [:results output :exports results]
- * Hello World in Haskell
- Here is the source code :
- #+call: haskell_hello_world [:exports code]
- and here is the result :
- #+call: haskell_hello_world [:results output :exports results]
- * Hello World in R
- Here is the source code :
- #+call: r_hello_world [:exports code]
- and here is the result :
- #+call: r_hello_world [:results output :exports results]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement