mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-04-26 15:13:56 +00:00
Added filename parameter
This commit is contained in:
parent
7135adbd49
commit
83aeecb68a
@ -2,6 +2,7 @@
|
|||||||
language: c
|
language: c
|
||||||
author: Adam Bard
|
author: Adam Bard
|
||||||
author_url: http://adambard.com/
|
author_url: http://adambard.com/
|
||||||
|
filename: learnc.c
|
||||||
---
|
---
|
||||||
|
|
||||||
Ah, C. Still the language of modern high-performance computing.
|
Ah, C. Still the language of modern high-performance computing.
|
||||||
@ -12,6 +13,7 @@ memory management and C will take you as far as you need to go.
|
|||||||
|
|
||||||
```c
|
```c
|
||||||
// Single-line comments start with //
|
// Single-line comments start with //
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Multi-line comments look like this.
|
Multi-line comments look like this.
|
||||||
*/
|
*/
|
||||||
@ -19,6 +21,7 @@ Multi-line comments look like this.
|
|||||||
// Import headers with #include
|
// Import headers with #include
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
// Declare function signatures in advance in a .h file, or at the top of
|
// Declare function signatures in advance in a .h file, or at the top of
|
||||||
// your .c file.
|
// your .c file.
|
||||||
@ -75,7 +78,7 @@ unsigned long long ux_long_long;
|
|||||||
// on your machine. sizeof(T) gives you the size of a variable with type T in
|
// on your machine. sizeof(T) gives you the size of a variable with type T in
|
||||||
// bytes so you can express the size of these types in a portable way.
|
// bytes so you can express the size of these types in a portable way.
|
||||||
// For example,
|
// For example,
|
||||||
printf("%d\n", sizeof(int)); // => 4 (on machines with 4-byte words)
|
printf("%lu\n", sizeof(int)); // => 4 (on machines with 4-byte words)
|
||||||
|
|
||||||
// Arrays must be initialized with a concrete size.
|
// Arrays must be initialized with a concrete size.
|
||||||
char my_char_array[20]; // This array occupies 1 * 20 = 20 bytes
|
char my_char_array[20]; // This array occupies 1 * 20 = 20 bytes
|
||||||
@ -107,7 +110,7 @@ Char #17 is the NUL byte.
|
|||||||
Chars #18, 19 and 20 have undefined values.
|
Chars #18, 19 and 20 have undefined values.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
printf("%d\n", a_string[16]); => 0
|
printf("%d\n", a_string[16]); // => 0
|
||||||
|
|
||||||
///////////////////////////////////////
|
///////////////////////////////////////
|
||||||
// Operators
|
// Operators
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
language: clojure
|
language: clojure
|
||||||
author: Adam Bard
|
author: Adam Bard
|
||||||
author_url: http://adambard.com/
|
author_url: http://adambard.com/
|
||||||
|
filename: test.clj
|
||||||
---
|
---
|
||||||
|
|
||||||
Clojure is a variant of LISP developed for the Java Virtual Machine. It has
|
Clojure is a variant of LISP developed for the Java Virtual Machine. It has
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
language: dart
|
language: dart
|
||||||
author: Joao Pedrosa
|
author: Joao Pedrosa
|
||||||
author_url: https://github.com/jpedrosa/
|
author_url: https://github.com/jpedrosa/
|
||||||
|
filename: learndart.dart
|
||||||
---
|
---
|
||||||
|
|
||||||
Dart is a newcomer into the realm of programming languages.
|
Dart is a newcomer into the realm of programming languages.
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
language: F#
|
language: F#
|
||||||
author: Scott Wlaschin
|
author: Scott Wlaschin
|
||||||
author_url: http://fsharpforfunandprofit.com/
|
author_url: http://fsharpforfunandprofit.com/
|
||||||
|
filename: learnfsharp.fs
|
||||||
---
|
---
|
||||||
|
|
||||||
F# is a general purpose functional/OO programming language. It's free and open source, and runs on Linux, Mac, Windows and more.
|
F# is a general purpose functional/OO programming language. It's free and open source, and runs on Linux, Mac, Windows and more.
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
language: haskell
|
language: haskell
|
||||||
author: Adit Bhargava
|
author: Adit Bhargava
|
||||||
author_url: http://adit.io
|
author_url: http://adit.io
|
||||||
|
filename: learnhaskell.hs
|
||||||
---
|
---
|
||||||
|
|
||||||
Haskell was designed as a practical, purely functional programming language. It's famous for
|
Haskell was designed as a practical, purely functional programming language. It's famous for
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
language: lua
|
language: lua
|
||||||
author: Tyler Neylon
|
author: Tyler Neylon
|
||||||
author_url: http://tylerneylon.com/
|
author_url: http://tylerneylon.com/
|
||||||
|
filename: learnlua.lua
|
||||||
---
|
---
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
language: php
|
language: php
|
||||||
author: Malcolm Fell
|
author: Malcolm Fell
|
||||||
author_url: http://emarref.net/
|
author_url: http://emarref.net/
|
||||||
|
filename: learnphp.php
|
||||||
---
|
---
|
||||||
|
|
||||||
This document describes PHP 5+.
|
This document describes PHP 5+.
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
language: python
|
language: python
|
||||||
author: Louie Dinh
|
author: Louie Dinh
|
||||||
author_url: http://ldinh.ca
|
author_url: http://ldinh.ca
|
||||||
|
filename: learnpython.py
|
||||||
---
|
---
|
||||||
|
|
||||||
Python was created by Guido Van Rossum in the early 90's. It is now one of the most popular
|
Python was created by Guido Van Rossum in the early 90's. It is now one of the most popular
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
language: R
|
language: R
|
||||||
author: e99n09
|
author: e99n09
|
||||||
author_url: http://github.com/e99n09
|
author_url: http://github.com/e99n09
|
||||||
|
filename: learnr.r
|
||||||
---
|
---
|
||||||
|
|
||||||
R is a statistical computing language.
|
R is a statistical computing language.
|
||||||
|
Loading…
Reference in New Issue
Block a user